Make 35 even more like 36

This commit is contained in:
Crista Lopes
2019-12-28 18:24:52 -08:00
parent 3a579e61e4
commit 40c292a4f7

View File

@@ -54,13 +54,14 @@ def build_model():
# Normalize characters using a dense layer # Normalize characters using a dense layer
model = Sequential() model = Sequential()
dense_layer = Dense(INPUT_VOCAB_SIZE, dense_layer = Dense(INPUT_VOCAB_SIZE,
input_shape=(INPUT_VOCAB_SIZE,)) input_shape=(INPUT_VOCAB_SIZE,),
activation='softmax')
model.add(dense_layer) model.add(dense_layer)
normalization_layer_set_weights(dense_layer)
return model return model
model = build_model() model = build_model()
model.summary() model.summary()
normalization_layer_set_weights(model.layers[0])
with open(sys.argv[1]) as f: with open(sys.argv[1]) as f:
for line in f: for line in f: