Minor aesthetic improvements
This commit is contained in:
@@ -30,13 +30,11 @@ def decode_one_hot(y):
|
||||
return ''.join(s)
|
||||
|
||||
def normalization_layer_set_weights(n_layer):
|
||||
print(n_layer.get_weights()[0].shape)
|
||||
print(n_layer.get_weights()[1].shape)
|
||||
wb = []
|
||||
w = np.zeros((LINE_SIZE*INPUT_VOCAB_SIZE, LINE_SIZE*INPUT_VOCAB_SIZE), dtype=np.float32)
|
||||
b = np.zeros((LINE_SIZE*INPUT_VOCAB_SIZE), dtype=np.float32)
|
||||
# Let lower case letters go through
|
||||
for r in range(0, LINE_SIZE*INPUT_VOCAB_SIZE, INPUT_VOCAB_SIZE):
|
||||
# Let lower case letters go through
|
||||
for c in string.ascii_lowercase:
|
||||
i = char_indices[c]
|
||||
w[r+i, r+i] = 1
|
||||
|
||||
Reference in New Issue
Block a user