This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#高速化のためのトライアル | |
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 |