Skip to content

Instantly share code, notes, and snippets.

View slaterb1's full-sized avatar

Benjamin Slater slaterb1

View GitHub Profile

Keybase proof

I hereby claim:

  • I am slaterb1 on github.
  • I am slaterb1 (https://keybase.io/slaterb1) on keybase.
  • I have a public key ASDlvNml1gTkl5sCOkwb5qmeBaxyRtIqyWIoE6v8fjhbYwo

To claim this, I am signing this object:

@slaterb1
slaterb1 / bug_test_6057.py
Last active March 30, 2017 17:10
Example script that crashes during add() due to indexing a set (crashes before my bug fix)
from keras.layers import Input
from keras.models import Model
from keras.layers.merge import add
input1 = Input(batch_shape=(20,10,16))
input2 = Input(batch_shape=(20,10,16))
o = add([input1, input2])
model = Model([input1, input2], o)
from keras.layers import Input, Masking, LSTM, Dense
from keras.models import Model
import numpy as np
# models created using Theano backend!
# Case1: model with return_sequences=True (output_shape = (1,10,1) )
##############################################################
input1 = Input(batch_shape=(1,10,16))
mask1 = Masking(mask_value=2.)(input1)