@@ -78,17 +78,17 @@ namespace distconv{
7878 template <typename Allocator>
7979 int
8080 ChannelwiseSoftmax<Backend, DataType>
81- ::backward (const tensor::Tensor<DataType, tensor::LocaleMPI, Allocator> &input_0 ,
81+ ::backward (const tensor::Tensor<DataType, tensor::LocaleMPI, Allocator> &output ,
8282 const tensor::Tensor<DataType, tensor::LocaleMPI, Allocator> &output_grad,
8383 tensor::Tensor<DataType, tensor::LocaleMPI, Allocator> &input_grad_0){
84- if (input_0 .get_local_size () == 0 ||
84+ if (output .get_local_size () == 0 ||
8585 output_grad.get_local_size () == 0 ||
8686 input_grad_0.get_local_size () == 0 ){
8787 util::MPIRootPrintStreamInfo () << " WARNING: EMPTY INPUT FOUND \n " ;
8888 return 1 ; // no op for empty inputs
8989 }
9090
91- const auto & input_0_dims = input_0 .get_local_shape ();
91+ const auto & input_0_dims = output .get_local_shape ();
9292 const auto num_channels = input_0_dims[2 ];
9393 const auto local_mini_batch_size = input_0_dims[3 ];
9494 const auto mat_channel_size = input_0_dims[0 ] * input_0_dims[1 ];
@@ -98,9 +98,9 @@ namespace distconv{
9898
9999 using LocalMat = El::Matrix<DataType, El::Device::GPU >;
100100
101- LocalMat local_input (mat_stride,
101+ LocalMat local_output (mat_stride,
102102 local_mini_batch_size,
103- input_0 .get_buffer (),
103+ output .get_buffer (),
104104 mat_stride);
105105
106106 LocalMat local_output_grad (mat_stride,
@@ -115,7 +115,7 @@ namespace distconv{
115115
116116 ::lbann::channelwise_softmax_bp_impl (num_channels,
117117 mat_channel_size,
118- local_input ,
118+ local_output ,
119119 local_output_grad,
120120 local_input_grad);
121121 return 1 ;
0 commit comments