A trivial error message updates on `at::Tensor _convolution` (#15830)
authorDerek Kim <bluewhale8202@gmail.com>
Tue, 8 Jan 2019 21:03:16 +0000 (13:03 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 8 Jan 2019 21:20:00 +0000 (13:20 -0800)
Summary:
I fixed an grammatical error on this function previously, but I also realized that its content was also wrong. A weight tensors of a convolutional layer should be at least 3 dimensional, not 2.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15830

Differential Revision: D13597968

Pulled By: soumith

fbshipit-source-id: 72a75106e88945c68d6462828b149441cfb5acde

aten/src/ATen/native/Convolution.cpp

index 42c77b4..cd45ae5 100644 (file)
@@ -301,7 +301,7 @@ at::Tensor _convolution(
   auto k = weight.ndimension();
   int64_t dim = k - 2;
 
-  AT_CHECK(dim > 0, "weight should have at least two dimensions");
+  AT_CHECK(dim > 0, "weight should have at least three dimensions");
 
   ConvParams params;
   params.stride = convolution_expand_param_if_needed(stride_, "stride", dim);