PD-MeshNet
PD-MeshNet copied to clipboard
torch.nn.modules.module.ModuleAttributeError: 'BatchNorm' object has no attribute 'weight'
I am training your UNet mesh segmenter model by running training_job_example_aliens_unet.py
file and I get this error when I am trying to initialize the model. Is there a fix for this? Can I disable initialization and expect the same accuracy?
I am training your UNet mesh segmenter model by running
training_job_example_aliens_unet.py
file and I get this error when I am trying to initialize the model. Is there a fix for this? Can I disable initialization and expect the same accuracy?
Add statement hasattr(module, 'weight')
before class_name.find('BatchNorm') != -1
in https://github.com/MIT-SPARK/PD-MeshNet/blob/e3f6c01ceff260778daf5fea66125413309e4399/pd_mesh_net/utils/models.py#L123 works for me. It could be changed to
elif hasattr(module, 'weight') and class_name.find('BatchNorm') != -1
Not sure if such changes will destroy the initialization of the network.