xiph / rnnoise

Recurrent neural network for audio noise reduction
BSD 3-Clause "New" or "Revised" License
4.07k stars 895 forks source link

how to understand the cost ? #84

Open ucasiggcas opened 5 years ago

ucasiggcas commented 5 years ago

Hi,

As a new learner in deep learning, I'm a little puzzled about the cost definition,

def my_crossentropy(y_true, y_pred): return K.mean(2*K.abs(y_true-0.5) * K.binary_crossentropy(y_pred, y_true), axis=-1)

Could you please explain the function ? Why 2*K.abs(y_true-0.5) * ?

and then the mymask def mymask(y_true): return K.minimum(y_true+1., 1.) Why y_true+1. and then minimum ?

and what's the mycost ? Should have the mymask(y_true) * (10*K.square(K.square(K.sqrt(y_pred) - K.sqrt(y_true))) ?

and what's in the my_accuracy ? why 2*K.abs(y_true-0.5) ?

Thx

xiaoyaoxiaoxian commented 4 years ago

Hi,

As a new learner in deep learning, I'm a little puzzled about the cost definition,

def my_crossentropy(y_true, y_pred): return K.mean(2*K.abs(y_true-0.5) * K.binary_crossentropy(y_pred, y_true), axis=-1)

Could you please explain the function ? Why 2*K.abs(y_true-0.5) * ?

and then the mymask def mymask(y_true): return K.minimum(y_true+1., 1.) Why y_true+1. and then minimum ?

and what's the mycost ? Should have the mymask(y_true) * (10*K.square(K.square(K.sqrt(y_pred) - K.sqrt(y_true))) ?

and what's in the my_accuracy ? why 2*K.abs(y_true-0.5) ?

Thx

The value of y_true for vad is 0,0.5,1. With y_true -0.5 operation, the value range can be tuned to -0.5~0.5. And the mask , it is used to mask some value which is -1.

GSC-30212 commented 4 years ago

HI, Please can anyone tell :- 1] Why the VAD values range is tuned between -0.5~0.5?