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

how to change the code in BP_GPU.cu file to make the output unit is linear

Open wangjianfly2003 opened this issue 7 years ago • 1 comments

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?

wangjianfly2003 avatar Jul 27 '17 07:07 wangjianfly2003

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); }

yongxuUSTC avatar Jul 27 '17 13:07 yongxuUSTC