colorful-colorization icon indicating copy to clipboard operation
colorful-colorization copied to clipboard

training issues

Open sepideh-srj opened this issue 3 years ago • 2 comments

Hi, I want to can continue training on a pretrained model provided in the resources, is that possible? I used the run_training script with all of the flags and gave my 'PYTORCH_WEIGHTS.tar' which was converted using convert_weights script. I am getting the following error:

line 298, in load_checkpoint
 self.optimizer.load_state_dict(state['optimizer'])
AttributeError: 'NoneType' object has no attribute 'load_state_dict'

I also tried to train from scratch but I get this error:

line 198, in train
    self.optimizer.zero_grad()
AttributeError: 'NoneType' object has no attribute 'zero_grad'

Can you help me with these issues please? Thank you so much.

sepideh-srj avatar Jun 17 '21 07:06 sepideh-srj

Can you tell me exactly how you ran the run_training script? (with a list of all parameters).

Time0o avatar Jun 18 '21 17:06 Time0o

I have the same issue and ran: python3 scripts/run_training --config config/default.json --data-dir data/train --checkpoint-dir checkpoints --log-file log.txt --iterations 10 --iterations-till-checkpoint 2

Clayton-Toste avatar Nov 21 '23 23:11 Clayton-Toste