Skip to content

Instantly share code, notes, and snippets.

View shi3z's full-sized avatar

shi3z shi3z

View GitHub Profile
import numpy as np
import chainer.functions as F
import chainer.links as L
from chainer import Variable,optimizers,Chain
import data
import cPickle as pickle
class Model(Chain):
def __init__(self):
import gzip
import os
import numpy as np
import six
from six.moves.urllib import request
parent = 'http://yann.lecun.com/exdb/mnist'
train_images = 'train-images-idx3-ubyte.gz'
train_labels = 'train-labels-idx1-ubyte.gz'
@shi3z
shi3z / reptile_keras.py
Last active February 8, 2023 15:59
Reptile meta learning on Keras
# Reptile example on keras
# Original code on pytorch at https://blog.openai.com/reptile/
# Porting to keras by shi3z Apr. 12 2018
import numpy as np
import matplotlib.pyplot as plt
import keras
from keras.layers import *
from keras.models import *
from keras import backend as K
from copy import deepcopy
import numpy as np
from PIL import Image
import moviepy.editor as mp
from pydub import AudioSegment
import cv2
from tqdm import tqdm
video_file = 'input.mp4'
video = cv2.VideoCapture(video_file)
#高速化のためのトライアル
import numpy as np
from PIL import Image
import moviepy.editor as mp
from pydub import AudioSegment
import cv2
from tqdm import tqdm
import time