microsoft / ELL

Embedded Learning Library
https://microsoft.github.io/ELL
Other
2.29k stars 295 forks source link

Square operation returns zero vector #223

Closed mr-yamraj closed 5 years ago

mr-yamraj commented 5 years ago

Hi I am trying to debug the file make_featurizer.py in tools/utilites/pythonlibs/audio/training

and when I am using the flag --power_spec it is returning zero values in the square node. I checked the values of last_node before this operation and I has values greater than zero. But when I am performing square using the below code it is returning zero vector. square_node = builder.AddUnaryOperationNode( ell_model, ell.nodes.PortElements(last_node.GetOutputPort("output")), ell.nodes.UnaryOperationType.square)

mr-yamraj commented 5 years ago

Other functions like sqrt, exp, tanh are working fine

mr-yamraj commented 5 years ago

In the same file the output that we get from the mel filterbank does not match with the output of the mel bank that I applied in python. I used https://github.com/jameslyons/python_speech_features/blob/master/python_speech_features/base.py#L149 as refrence to calculate the fbanks and the algorithm they have used to calculate the mel filter bank is correct.

mr-yamraj commented 5 years ago

Okay! found the bug for FFT will give a pull request but I am not finding the bug of the square (in my first comment)

kernhanda commented 5 years ago

This should be fixed in v2.5.4

mr-yamraj commented 5 years ago

Thanks! It works now.