Made the pooling code fp16 friendly

Change: 123329817
This commit is contained in:
Benoit Steiner 2016-05-26 09:06:34 -08:00 committed by TensorFlower Gardener
parent a2009115df
commit a5b8693369

View File

@ -305,7 +305,7 @@ void SpatialAvgPool(OpKernelContext* context, Tensor* output,
const int out_offset =
(b * params.out_height + ph) * params.out_width + pw;
out_mat.col(out_offset) += in_mat.col(in_offset);
out_count(out_offset)++;
out_count(out_offset) += T(1);
}
}
}