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