Open Abdellah-Laassairi opened 1 year ago
I try to modify model_hook.py
the input type is tuple and input[0] type is list, so it can't detach
change
itemsize = input[0].detach().numpy().itemsize
to
itemsize = 0
for i in range(len(input[0])):
itemsize += input[0][i].detach().numpy().itemsize
and
module.input_shape = torch.from_numpy(
np.array(input[0].size()[1:], dtype=np.int32))
to
module.input_shape = torch.from_numpy(
np.array(input[0][0].size()[1:], dtype=np.int32))
is work to me
Expected Behavior
Retrieving the statistics of the SMP model with FPN architecture and resnet34 encoder.
Actual Behavior
Input[0] is a list which causes an AttributeError.
Code to Reproduce the Problem
Specifications:
Version: 0.0.7 Platform: Ubuntu 22.04.2 LTS