Skip to content

Commit

Permalink
use np.prod instead of np.product which was removed in Numpy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGensollen committed Oct 9, 2024
1 parent 35e8ea9 commit 91326c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clinicadl/utils/network/cnn/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def fc_dict_design(n_fcblocks, convolutions, initial_shape, n_classes=2):
out_channels = last_conv["out_channels"]
flattened_shape = np.ceil(np.array(initial_shape) / 2**n_conv)
flattened_shape[0] = out_channels
in_features = np.product(flattened_shape)
in_features = np.prod(flattened_shape)

# Sample number of FC layers
ratio = (in_features / n_classes) ** (1 / n_fcblocks)
Expand Down

0 comments on commit 91326c5

Please sign in to comment.