neural_temporal_models icon indicating copy to clipboard operation
neural_temporal_models copied to clipboard

complex to real cast for NPSS calculation

Open jutanke opened this issue 5 years ago • 0 comments

I am a bit confused about this two lines:

https://github.com/cr7anand/neural_temporal_models/blob/0b72be14e1fba0ed681322994e09116496ff19e8/metrics.py#L54 and https://github.com/cr7anand/neural_temporal_models/blob/0b72be14e1fba0ed681322994e09116496ff19e8/metrics.py#L77

I think

gt_fourier_coeffs = np.zeros(euler_gt_sequences.shape)

should actually be

gt_fourier_coeffs = np.zeros(euler_gt_sequences.shape, dtype=np.complex)

as you would loose the imaginary part otherwise, due to casting from complex to real. Is this a bug in the code or was this done intentionally? Or am I totally missing something?

jutanke avatar May 26 '20 08:05 jutanke