Skip to content

Commit

Permalink
FIX Uses C++ syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjpfan committed Jul 20, 2021
1 parent c100a3a commit a4e0fea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/csrc/api/include/torch/nn/functional/padding.h
Expand Up @@ -44,7 +44,7 @@ inline Tensor pad(const Tensor& input,
"Padding mode \"",
torch::enumtype::get_enum_name(mode),
"\" doesn't take in value argument");
if (pad.size() == 2 and (input.dim() == 2 or input.dim() == 3)) {
if (pad.size() == 2 && (input.dim() == 2 || input.dim() == 3)) {
if (c10::get_if<enumtype::kReflect>(&mode)) {
return torch::reflection_pad1d(input, pad);
} else if (c10::get_if<enumtype::kReplicate>(&mode)) {
Expand Down

0 comments on commit a4e0fea

Please sign in to comment.