liyunsheng13 / BDL

MIT License
222 stars 30 forks source link

error at running train.py for cyclegan #44

Open lucafei opened 3 years ago

lucafei commented 3 years ago

i met a problem at running train.py for cyclegan, when i replace the model file in the cyclegan by using the uploaded cyclegan files from @liyunsheng13, i find it will happend that list index out of range like following picture showing error for cyclegan do you guys have any solution for that

liyunsheng13 commented 3 years ago

I don't meet this problem.

Nadavc220 commented 3 years ago

In case you are still trying to understand what the problem is, I think the problem is the CycleGANModel's init function is called initialize() rather than init which causes the only BaseModel init to be called upon the model initialization, which causes the optimizer list not to be filled. you can change the name to init so it will be called upon its construction.

Notice that the first line of CycleGANModel init calls to BaseModel.Initialize() which does not exist. you can change that to BaseModel.init.(self, opt).

**for some reason instead of posting init followed and preceded by two underscores a bold init is posted.