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

Errors found when run the code #1

Closed
zili-zhou opened this issue Oct 26, 2021 · 1 comment
Closed

Errors found when run the code #1

zili-zhou opened this issue Oct 26, 2021 · 1 comment

Comments

@zili-zhou
Copy link

Hi, I have found some errors when I try to run the train.py.

Dataset: I select "camel-poses" in animal dataset.

In the process "Train", when I set the input data folder in tcsr/data/data_loader.py and output folder in tcsr/train/configs/our_anim.yaml, I run the train.py with command "python train.py --conf configs/our_anim.yaml".

1.File ".../tcsr/tcsr/models/encoder.py", line 13, in
from tcsr.train.helpers import Device
ImportError: cannot import name 'Device' from partially initialized module 'tcsr.train.helpers' (most likely due to a circular import) (.../tcsr/tcsr/train/helpers.py)

This error happens because "helpers.py" import somthing from "encoder.py" but "class Device" is defined in "helpers.py", which is imported also in "encoder.py", cause the circular error.

2.File ".../tcsr/tcsr/train/train.py", line 77, in
model = tr_helpers.create_model_train(conf, num_cws=len(ds))
TypeError: create_model_train() got an unexpected keyword argument 'num_cws'
There is no augument "num_cws" in function "create_model_train(conf, num_cws=len(ds))" in helpers.py

3.Traceback (most recent call last):
File "/home/zzl/tcsr2.0/tcsr/tcsr/train/train.py", line 77, in
model = tr_helpers.create_model_train(conf)
File "/home/zzl/tcsr2.0/tcsr/tcsr/train/helpers.py", line 190, in create_model_train
alphas_sciso=conf['alphas_sciso'], loss_mmcl=conf['loss_mmcl'],
KeyError: 'loss_mmcl'
In "class ModelMetricConsistency(nn.Module, Device)" in models_mc.py, there is no augument "loss_mmcl" and also there is no "loss_mmcl" found in "our_anim.yaml".

4.Traceback (most recent call last):
File ".../tcsr/tcsr/train/train.py", line 141, in
losses = model.loss(
File ".../tcsr/tcsr/models/models_mc.py", line 308, in loss
L_mc = self.loss_mc_no_interp(EFG=efg)
AttributeError: 'ModelMetricConsistency' object has no attribute 'loss_mc_no_interp'

In "loss()" function in "models_mc.py", if loss_mc == True, Metric consistency is used but " L_mc = self.loss_mc_no_interp(EFG=efg)", loss_mc_no_interp() is used without defined.

5.Traceback (most recent call last):
File ".../tcsr/tcsr/train/train.py", line 141, in
losses = model.loss(
File ".../tcsr/tcsr/models/models_mc.py", line 315, in loss
L_ssc = self._loss_self_supervised_correspondences(
File ".../tcsr/tcsr/models/models_mc.py", line 264, in _loss_self_supervised_correspondences
inds_p2gt = self._reg_func_impl(pc_gt[:, 0], pc_p[:, 0])[0] # (B, M)

AttributeError: 'ModelMetricConsistency' object has no attribute '_reg_func_impl'

In "loss()" function in "models_mc.py", if loss_ssc == True, Self-supervised correspondences is used. "L_ssc = self._loss_self_supervised_correspondences()", in function _loss_self_supervised_correspondences(), there is a line "inds_p2gt = self._reg_func_impl(pc_gt[:, 0], pc_p[:, 0])[0]", _reg_func_impl() is used but noe defined.

After set loss_mc and loss_ssc is False, it can run.

@bednarikjan
Copy link
Owner

Hi Zili, thank you for listing the errors! It should be all fixed now, please update the repo.

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

2 participants