Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a8cf03a

Browse files
authored
1 parent 822ac90 commit a8cf03a

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)

AltStyle によって変換されたページ (->オリジナル) /