Skip to content

Commit 6f0b2b1

Browse files
zhangting2020lanxianghit
authored andcommitted
[cherry-pick] fix the bug of conv_transpose cudnn kernel, test=release/1.6 (#20958) (#20974)
fix the bug of conv_transpose cudnn kernel:cherry-pick #20958
1 parent 692a04e commit 6f0b2b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/fluid/operators/conv_transpose_cudnn_op.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class CUDNNConvTransposeOpKernel : public framework::OpKernel<T> {
7272
const T* filter_data = filter->data<T>();
7373
const std::string data_layout_str = ctx.Attr<std::string>("data_format");
7474
const paddle::operators::DataLayout data_layout =
75-
(data_layout_str == "NCHW" ? DataLayout::kNCHW : DataLayout::kNHWC);
75+
(data_layout_str != "NHWC" ? DataLayout::kNCHW : DataLayout::kNHWC);
7676

7777
// if channel_last, transpose to channel_first
7878
Tensor input_transpose;

0 commit comments

Comments
 (0)