Hi everyone,
I have reconfigured my code to work with python3, and now when I load my saved model, model.children() outputs the entire model as one layer. This was not happening when I was using python2.
When running this code:
for child in model.children():
print(“PRINTING LAYER”)
print(child)
I get output:
PRINTING LAYER
Net(
(conv11): Conv2d(1, 192, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))
(conv12): Conv2d(192, 192, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))
(conv13): Conv2d(192, 192, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))
(conv14): Conv2d(192, 192, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))
(conv15): Conv2d(192, 192, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))
(conv16): Conv2d(192, 192, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))
(pool1): MaxPool2d(kernel_size=4, stride=4, padding=0, dilation=1, ceil_mode=False)
(conv21): Conv2d(192, 192, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))
(conv22): Conv2d(192, 64, kernel_size=(5, 5), stride=(1, 1), padding=(2, 2))
(pool2): MaxPool2d(kernel_size=6, stride=6, padding=0, dilation=1, ceil_mode=False)
(d): Dropout(p=0.5)
(fc1): Linear(in_features=64, out_features=40, bias=True)
(fc2): Linear(in_features=40, out_features=15, bias=True)
)