DNN-for-speech-enhancement icon indicating copy to clipboard operation
DNN-for-speech-enhancement copied to clipboard

how to normalize the input and target file?

Open gx2017 opened this issue 7 years ago • 2 comments

Hi Dr. Xu,

Your paper mentioned the input and target file should be normalized to zero mean and unit variance. Now i use the qnnorm command to prepare the ".fea_norm" file needed by .pl file. Am i right? But, in the Interface.cc file, i found you use the following sentence to normalize the input file. dataori[2+j +i*(para->fea_dim +2)] -= mean[j]; dataori[2+j +i*(para->fea_dim +2)] = dVar[j]; using following sentence to normalize the target file: targori[2+j +i(para->layersizes[numlayers-1] +2)] -= 0; targori[2+j +i*(para->layersizes[numlayers-1] +2)] *= 1; It seems the target file does not be normalized with the above two sentence.

Could you tell me how to normalize the target file?

gx2017 avatar Jul 20 '17 06:07 gx2017

Yes, QNNORM is used to prepare .fea_norm

For the target feature, it also should be normalized which is similar to input feature. I thought it maybe because i used it for predicting idea binary/soft mask. In that case, it is no need to normalize. Maybe you can help to put an update on this point.

yongxuUSTC avatar Jul 21 '17 08:07 yongxuUSTC

Ok. I will try to normalize the target feature. Thank you. Now i have another question: your paper also mentioned that "The type of the hidden units is sigmoid, and the output unit is linear." So in your code i should change the following code in the BP_GPU.cu file else{ /////////////////////////////直接注释掉,输出地就是linear的??? //DevSoftmax(streams[0],n_frames, cur_layer_units, cur_layer_x, dev[0].out); DevSigmoid(streams[0],cur_layer_size, cur_layer_x, cur_layer_y); //DevLinearOutCopy(streams[0],n_frames, cur_layer_units, cur_layer_x, dev[0].out); //out=cur_layer_x; //cudaSetDevice(0); //printf("come here\n"); cudaMemcpy(dev[0].out,cur_layer_y,n_framescur_layer_unitssizeof(float),cudaMemcpyDeviceToDevice); //cudaMemcpy(out_check,cur_layer_x,n_framescur_layer_unitssizeof(float),cudaMemcpyDeviceToHost);

into else{ /////////////////////////////直接注释掉,输出地就是linear的??? //DevSoftmax(streams[0],n_frames, cur_layer_units, cur_layer_x, dev[0].out); //DevSigmoid(streams[0],cur_layer_size, cur_layer_x, cur_layer_y); DevLinearOutCopy(streams[0],n_frames, cur_layer_units, cur_layer_x, cur_layer_y); //out=cur_layer_x; //cudaSetDevice(0); //printf("come here\n"); cudaMemcpy(dev[0].out,cur_layer_y,n_framescur_layer_unitssizeof(float),cudaMemcpyDeviceToDevice); //cudaMemcpy(out_check,cur_layer_x,n_framescur_layer_unitssizeof(float),cudaMemcpyDeviceToHost);

	}

Am i right?

gx2017 avatar Jul 24 '17 02:07 gx2017