Skip to content

Instantly share code, notes, and snippets.

View whenyd's full-sized avatar

whenyd whenyd

View GitHub Profile
@whenyd
whenyd / inception_v1
Created February 10, 2018 09:13
Keras implementation of inception v1
from keras.layers import Conv2D, MaxPooling2D, Input, concatenate
def inception(input,
filters_1x1,
filters_3x3_reduce, filters_3x3,
filters_5x5_reduce, filters_5x5,
filters_pool_proj):
"""
:param input:
@whenyd
whenyd / up-resolution
Created February 11, 2018 02:47
Up-resolution using transposed convolution.
from keras.models import Model
from keras.layers import Input, Conv2D, MaxPooling2D, Conv2DTranspose
input_img = Input(shape=(224, 224, 3))
x = Conv2D(16, (3, 3), padding='same', activation='relu')(input_img)
x = MaxPooling2D((2, 2))(x)
x = MaxPooling2D((2, 2))(x)
x_8x = MaxPooling2D((2, 2))(x)
x_16x = MaxPooling2D((2, 2))(x_8x)
x_32x = MaxPooling2D((2, 2))(x_16x)