handwriting_line_generation
handwriting_line_generation copied to clipboard
’self._ valid_ Epoch() 'Wrong problem
This is a great job When I first started encoder training. In line 279 of "base_trainer. py", there is a problem with "val_ result=self. _validd_Epoch". This function cannot be found. My current solution is to annotate valid modules. Is there a better way to solve this problem? Thank you.
It looks like a typo was introduced to your copy of the code, it is val_result = self._valid_epoch()
in the repo
Sorry, I didn't describe this problem very clearly. The following is the original error message.
Train iteration: 900, loss: 3.044715, recogLoss: 3.044715, CER: 0.990476, WER: 1.000000, sec_per_iter: 0.320079, avg_loss: 3.146585, avg_recogLoss: 3.146585, avg_CER: 0.997909, avg_WER: 1.000000,
validate
Train iteration: 1000, loss: 2.888014, recogLoss: 2.888014, CER: 0.979681, WER: 1.000000, sec_per_iter: 0.319059, avg_loss: 3.046097, avg_recogLoss: 3.046097, avg_CER: 0.990086, avg_WER: 0.999848,
WARNING: upsampling image to fit size
Traceback (most recent call last):
File "/home/sonel/code/dormitory_code_20221104/GAN/handwriting_line_generation-master/train.py", line 132, in
What is your training config?
My training configuration is '-c configs/cf_IAM_hwr_cnnOnly_batchnorm_aug.json'
In the json file, I only changed the file_path.
I initially queried whether there is val_result = self._valid_epoch()
function in the class, but I didn't seem to find it.So I'm considering whether it is caused by this factor.
Because this is the verification part, I deleted all the verification parts without affecting the final training.
There must be a better solution here.
Thank you for your detailed answer,have a good day!
Looks like a bug from a refactor. Line 464 should be pred, recon, losses = self.run_hwr(instance)
I've now fixed this in the repo. Change your code and try it.
Thank you for your advice, I will have a try