Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error while funetunning zjumocap #39

Open
sylyt62 opened this issue Jul 4, 2023 · 1 comment
Open

Strange error while funetunning zjumocap #39

sylyt62 opened this issue Jul 4, 2023 · 1 comment

Comments

@sylyt62
Copy link

sylyt62 commented Jul 4, 2023

I want to finetune with zjumocap 313, just like what the config does. But met the following issue.
Is it caused by windows?

btw I modified some lines in

os.system('mkdir -p {}'.format(model_dir))

to something like os.makedirs(model_dir, exist_ok=True), which will create "-p" folder under the workspace in windows.

Error logs:

(smpl-py38-torch110-cu111) PS D:\workspace4tian\ENeRF> python train_net.py --cfg_file configs/enerf/zjumocap/zjumocap_train.yaml
Workspace:  D:\workspace4tian\ENeRF
configs/enerf/dtu_pretrain.yaml
configs/enerf/zjumocap/zjumocap_train.yaml
EXP NAME:  zjumocap
D:\sdk\envs\smpl-py38-torch110-cu111\lib\site-packages\torchvision\models\_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
D:\sdk\envs\smpl-py38-torch110-cu111\lib\site-packages\torchvision\models\_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=VGG16_Weights.IMAGENET1K_V1`. You can also use `weights=VGG16_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
Setting up [LPIPS] perceptual loss: trunk [vgg], v[0.1], spatial [off]
D:\sdk\envs\smpl-py38-torch110-cu111\lib\site-packages\torchvision\models\_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
D:\sdk\envs\smpl-py38-torch110-cu111\lib\site-packages\torchvision\models\_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=VGG16_Weights.IMAGENET1K_V1`. You can also use `weights=VGG16_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
Loading model from: D:\sdk\envs\smpl-py38-torch110-cu111\lib\site-packages\lpips\weights\v0.1\vgg.pth
子目录或文件 D:\workspace4tian\ENeRF\result\enerf\zjumocap\default 已经存在。
处理: D:\workspace4tian\ENeRF\result\enerf\zjumocap\default 时出错。
Load pretrain model: D:\workspace4tian\ENeRF\trained_model\enerf\dtu_pretrain\latest.pth
Traceback (most recent call last):
  File "train_net.py", line 117, in <module>
    main()
    w.start()
  File "C:\Program Files\Python38\lib\multiprocessing\process.py", line 121, in start
    self._popen = self._Popen(self)
  File "C:\Program Files\Python38\lib\multiprocessing\context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Program Files\Python38\lib\multiprocessing\context.py", line 327, in _Popen
    return Popen(process_obj)
  File "C:\Program Files\Python38\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Program Files\Python38\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'lib.datasets.zjumocap.enerf.Dataset'>: it's not the same object as lib.datasets.zjumocap.enerf.Dataset
Workspace:  D:\workspace4tian\ENeRF
configs/enerf/dtu_pretrain.yaml
configs/enerf/zjumocap/zjumocap_train.yaml
EXP NAME:  zjumocap
(smpl-py38-torch110-cu111) PS D:\workspace4tian\ENeRF> Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files\Python38\lib\multiprocessing\spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "C:\Program Files\Python38\lib\multiprocessing\spawn.py", line 126, in _main
    self = reduction.pickle.load(from_parent)
EOFError: Ran out of input

@sylyt62
Copy link
Author

sylyt62 commented Jul 4, 2023

I hardcode the num_works of train_loader to 0 and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant