Hi, guys.
So… I’m building a script to convert weights and configuration files from a model. And to do that, I’d like to access the attributes list from the modules. For example:
for name, m in model.named_modules():
t = type(m)
if t is torch.nn.modules.conv.Conv2d:
print(m.in_channels)
print(m.out_channels)
print(m.kernel_size)
print(m.stride)
print(m.dilation)
In that case, above, I defined the attributes to the Conv2d manually. But if the next module is models.common.Conv?
I’d like to know if is it possible to have access to this list?
Tks!