Closed surfingnirvana closed 1 year ago
It is possible that the dataset failed to load, causing this for loop not to be run.
The videos have mp4 format. I had the same error with the repository https://github.com/snap-research/articulated-animation/ Training articulated-animation in standard training mode with png and mp4 files was successful. When trying to train in avd mode mp4 files did not work. pngs were working fine. Now in thin plate model neither png nor mp4 do not work.
I had to change this line in run.py because of an error:
with open(opt.config) as f:
config = yaml.load(f)
to
with open(opt.config) as f:
config = yaml.load(f, Loader=yaml.FullLoader)
It appears to have this error when i change the num_repeats = 150 to 2 in config file. UnboundLocalError: local variable 'x' referenced before assignment
Are you using your own dataset with a small sample size, if so, change this line to drop_last=False
.
Ok, this is fixed. I am using a small sample size. But it is still using the memory to the max. Is there any way i could limit this behaviour? For standard training i set batch size to 7 for ~10 GB VRAM and num_repeats = 2. With your fix its running ok.
@surfingnirvana Did you end up with good results from your training?
\Thin-Plate-Spline-Motion-Model\train.py", line 93, in train logger.log_epoch(epoch, model_save, inp=x, out=generated) UnboundLocalError: local variable 'x' referenced before assignment
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\NEURAL\Thin-Plate-Spline-Motion-Model\run.py", line 83, in
train(config, inpainting, kp_detector, bg_predictor, dense_motion_network, opt.checkpoint, log_dir, dataset)
File "C:\NEURAL\Thin-Plate-Spline-Motion-Model\train.py", line 93, in train
logger.log_epoch(epoch, model_save, inp=x, out=generated)
TypeError: exit() takes 1 positional argument but 4 were given