From: Derek Kim Date: Tue, 8 Jan 2019 21:03:16 +0000 (-0800) Subject: A trivial error message updates on `at::Tensor _convolution` (#15830) X-Git-Tag: accepted/tizen/6.5/unified/20211028.231830~1969 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92a2bfe52d6498b8c0be6de7773ebf778d7bff8c;p=platform%2Fupstream%2Fpytorch.git A trivial error message updates on `at::Tensor _convolution` (#15830) 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 --- diff --git a/aten/src/ATen/native/Convolution.cpp b/aten/src/ATen/native/Convolution.cpp index 42c77b4..cd45ae5 100644 --- a/aten/src/ATen/native/Convolution.cpp +++ b/aten/src/ATen/native/Convolution.cpp @@ -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);