ericsujw / InstColorization

MIT License
712 stars 152 forks source link

For train own dataset(stage = instance & fusion) #15

Closed Ericforliu closed 4 years ago

Ericforliu commented 4 years ago

When I want to train my own dataset, I found that, only stage=full can run well, stage=instance or fusion will get any exception for that, get an empty tensor.

So, now I can get the last_net_G.pth well, BUT I can't get last_net_GF & last_net_Gcomp.

Thanks.

Ericforliu commented 4 years ago

The error is like : Traceback (most recent call last): File "train.py", line 31, in model = create_model(opt) File "/content/drive/My Drive/InstColorization-master/models/init.py", line 37, in create_model instance.initialize(opt) File "/content/drive/My Drive/InstColorization-master/models/train_model.py", line 69, in initialize list(self.netGF.module.model10.parameters()) + File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 594, in getattr type(self).name, name)) AttributeError: 'FusionGenerator' object has no attribute 'module'

I have deleted the model10 but it changed to error in line 68.

Ericforliu commented 4 years ago

in Windows, for FusionGenerator and InstanceGeneretor, you should delete the module part and can run well