Skip to content

Instantly share code, notes, and snippets.

@PavlosMelissinos
PavlosMelissinos / keras_unpooling.py
Last active May 25, 2017 09:55
Rudimentary implementation of unpooling for keras
from keras import backend as K
from keras.layers.convolutional import UpSampling2D
class MaxPoolingMask2D(MaxPooling2D):
def __init__(self, pool_size=(2, 2), strides=None, border_mode='valid',
dim_ordering='default', **kwargs):
super(MaxPoolingMask2D, self).__init__(pool_size, strides, border_mode,
dim_ordering, **kwargs)
def _pooling_function(self, inputs, pool_size, strides,
@PavlosMelissinos
PavlosMelissinos / run_inference_from_memory.py
Created April 28, 2017 07:07
im2txt inference modified
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@PavlosMelissinos
PavlosMelissinos / KerasFCN_wrong_shape_demo.ipynb
Created April 21, 2017 09:21
Demo that reproduces a bug in SegDataGenerator
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.