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

Inoperative lines of code in the training file #6

Open
tmondalvogo opened this issue Dec 15, 2023 · 0 comments
Open

Inoperative lines of code in the training file #6

tmondalvogo opened this issue Dec 15, 2023 · 0 comments

Comments

@tmondalvogo
Copy link

Hello,
Thank you for sharing the code. I find that there are some inoperative lines of code in the training file. The use of these operations is not clear and it seems that these operations are not needed for training.

# TODO: random pick 4

The array prev_v[ ] doesn't have any participation in the training. It is created and then deleted.
The variable is created in line :
prev_hm = prev_heatmap.clone().detach()

Then it is only used to check an assert condition :

prev_v = torch.stack(prev_v, dim=1) # b*k*c*t*h*w

Then it is used for prev_hm [], which is not used further:
https://github.com/ericsujw/KpSFR/blob/3d4b7968e2ab34239bf4c175f17a29efa46a691f/train_nn.py#L267C24-L267C24

Hence all the operations done
From line:

prev_hm = prev_heatmap.clone().detach()

To line:
prev_v = torch.stack(prev_v, dim=1) # b*k*c*t*h*w

has no use in the training code i.e. these operations are not used in any sort of loss calculation etc.

Then why they are done in this code? What is the use of it?

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