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 keras.preprocessing.sequence | |
from keras.models import Model | |
from keras.layers import Input, Embedding, Recurrent, Masking, GRU, TimeDistributed, Dense | |
import numpy as np | |
np.random.seed(0) | |
# create model | |
input_layer = Input(shape=(3,), dtype='int32', name='input') | |
embeddings = Embedding(input_dim=20, output_dim=2, input_length=3, mask_zero=True, name='embeddings')(input_layer) |
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
keras_bug.py << buffers | |
from keras.layers import Input, Dense | |
from keras.models import Model, load_model | |
import numpy as np | |
input_layer = Input(shape=(5,)) | |
hidden = Dense(5)(input_layer) | |
output1 = Dense(1, name='output1')(hidden) | |
output2 = Dense(1, name='output2')(hidden) |