wei-mao-2019 / LearnTrajDep

code for learning trajectory dependencies for human motion prediction
MIT License
244 stars 45 forks source link

one redundant line. #2

Closed tracer9 closed 5 years ago

tracer9 commented 5 years ago

Hi Wei! Thanks for your kindly sharing your code. When reading, I found a redundant line, though unharmful, should be corrected in my opinion.

https://github.com/wei-mao-2019/LearnTrajDep/blob/master/utils/data_utils.py#L668

# if is not testing or validation then get the data statistics
if not (subj == 5 and subj == 11):
    data_std = np.std(complete_seq, axis=0)
    data_mean = np.mean(complete_seq, axis=0)

In this if line, when using and, the condition is always True regardless of train, val, or test. Specifically, and should be or, if you want to achieve what the comment implies.

However, when you change to or, which means in test and val you gonna use the statistics you passed, it would leads to error. Because you have set data_std = 1.0 for those dim_to_ignore dimensions when you call train_loader.

A very, very small typo you may not notice. Thanks for your code again.

wei-mao-2019 commented 5 years ago

Hi @tracer9,

Thank you very much for pointing out that.

Yes, some code is not used in the final version. It is used to do some additional ablation experiments in order to clarify my idea at the beginning of this project.

Cheers