DNN-for-speech-enhancement
DNN-for-speech-enhancement copied to clipboard
how to change the code in BP_GPU.cu file to make the output unit is linear
your paper mentioned that "The type of the hidden units is sigmoid, and the output unit is linear." So i think i should change the following code in the BP_GPU.cu file else{ DevSigmoid(streams[0],cur_layer_size, cur_layer_x, cur_layer_y); } as else{ DevLinearOutCopy(streams[0],n_frames, cur_layer_units, cur_layer_x, cur_layer_y); cudaMemcpy(dev[0].out,cur_layer_y,n_framescur_layer_unitssizeof(float),cudaMemcpyDeviceToDevice); } Am i right?
comment the first line, just use cudaMemcpy. I have already updated it. Thanks for your pointing out.
else{ //DevLinearOutCopy(streams[0],n_frames, cur_layer_units, cur_layer_x, cur_layer_y); cudaMemcpy(dev[0].out,cur_layer_y,n_framescur_layer_unitssizeof(float),cudaMemcpyDeviceToDevice); }