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 #5

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

Inoperative lines of code in the training file #5

tmondalvogo opened this issue Dec 15, 2023 · 0 comments

Comments

@tmondalvogo
Copy link

tmondalvogo commented Dec 15, 2023

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 ref_v[ ] doesn't have any participation in the training. It is created and then deleted.
The variable is created in line :
ref_v = []

Then it is only used to check an assert condition :

assert torch.isnan(ref_v).sum() == 0, print('ref_v: ', ref_v)

Then it is deleted :
del ref_v

Hence all the operations done
From line:

ref_hm = target_dilated_hm.clone()

To line:
assert torch.isnan(ref_v).sum() == 0, print('ref_v: ', ref_v)

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?

To easily follow the code, you may use the cleaner version of the code here :
#4 (comment)

@tmondalvogo tmondalvogo changed the title Unuseful operation in the training code Useless operation in the training code Dec 15, 2023
@tmondalvogo tmondalvogo changed the title Useless operation in the training code Inoperative operation in the training code Dec 15, 2023
@tmondalvogo tmondalvogo changed the title Inoperative operation in the training code Inoperative lines of code in the training file Dec 15, 2023
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