pggan-pytorch
pggan-pytorch copied to clipboard
AttributeError: 'DataParallel' object has no attribute 'grow_network'
When I run the model using only 100 images for testing I got this error :
Traceback (most recent call last): File "trainer.py", line 380, in <module> trainer.train() File "trainer.py", line 261, in train self.resl_scheduler() File "trainer.py", line 157, in resl_scheduler self.G.grow_network(floor(self.resl)) File "/home/miri/anaconda3/envs/mirilab/lib/python3.7/site-packages/torch/nn/modules/module.py", line 576, in __getattr__ type(self).__name__, name)) AttributeError: 'DataParallel' object has no attribute 'grow_network'
I met the same error change self.G.grow_network into self.G.module.grow_network then it fixed however I'm not sure it's the right way to change, semantically
@ningmomomomomo @aminmiri May I ask if you encountered other errors in subsequent training? like this after you mentioned: self.fadein['gen'] = dict(self.G.model.named_children())['fadein_block'] self.fadein['dis'] = dict(self.D.model.named_children())['fadein_block'] AttributeError:DataParallel not has attributes model