Skip to content

Commit 5d0de53

Browse files
committed
Return as NumPy array
1 parent 8e3c461 commit 5d0de53

18 files changed

Lines changed: 1 addition & 1 deletion
198 Bytes
Binary file not shown.
17 KB
Binary file not shown.
200 Bytes
Binary file not shown.
41.6 KB
Binary file not shown.

pygad/cnn/cnn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def layers_weights_as_vector(model, initial=True):
140140
# Currently, the weights of the layers are in the reverse order. In other words, the weights of the first layer are at the last index of the 'network_weights' list while the weights of the last layer are at the first index.
141141
# Reversing the 'network_weights' list to order the layers' weights according to their location in the network architecture (i.e. the weights of the first layer appears at index 0 of the list).
142142
network_weights.reverse()
143-
return network_weights
143+
return numpy.array(network_weights)
144144

145145
def update_layers_trained_weights(model, final_weights):
146146

252 Bytes
Binary file not shown.
1.6 KB
Binary file not shown.
35.8 KB
Binary file not shown.
20.7 KB
Binary file not shown.
390 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)