Skip to content

Commit c4e1164

Browse files
authored
Merge pull request #329 from ahmedfgad/master
Sync
2 parents a2231eb + 19d6bb0 commit c4e1164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygad/cnn/cnn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def layers_weights_as_matrix(model, vector_weights):
143143
# 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.
144144
# 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).
145145
network_weights.reverse()
146-
return numpy.array(network_weights)
146+
return numpy.array(network_weights, dtype=object) # NEP 34: https://numpy.org/neps/nep-0034-infer-dtype-is-object.html
147147

148148
def layers_weights_as_vector(model, initial=True):
149149

0 commit comments

Comments
 (0)