Skip to content

Commit de15134

Browse files
committed
Fix torch::nn::Sequential constructor error when building with gcc
1 parent 39699e2 commit de15134

File tree

1 file changed

+1
-1
lines changed
  • tutorials/intermediate/deep_residual_network/include

1 file changed

+1
-1
lines changed

tutorials/intermediate/deep_residual_network/include/resnet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ torch::nn::Sequential ResNetImpl<Block>::make_layer(int64_t out_channels, int64_
6363
torch::nn::Sequential downsample{nullptr};
6464

6565
if (stride != 1 || in_channels != out_channels) {
66-
downsample = {
66+
downsample = torch::nn::Sequential{
6767
conv3x3(in_channels, out_channels, stride),
6868
torch::nn::BatchNorm(out_channels)
6969
};

0 commit comments

Comments
 (0)