diff --git a/mindinsight/wizard/conf/templates/network/alexnet/src/alexnet.py-tpl b/mindinsight/wizard/conf/templates/network/alexnet/src/alexnet.py-tpl index cc1f1da2..bdc8cb8e 100644 --- a/mindinsight/wizard/conf/templates/network/alexnet/src/alexnet.py-tpl +++ b/mindinsight/wizard/conf/templates/network/alexnet/src/alexnet.py-tpl @@ -1,4 +1,4 @@ -# Copyright 2020 Huawei Technologies Co., Ltd +# Copyright 2020-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ class AlexNet(nn.Cell): self.conv4 = conv(384, 384, 3, pad_mode="same") self.conv5 = conv(384, 256, 3, pad_mode="same") self.relu = nn.ReLU() - self.max_pool2d = P.MaxPool(ksize=3, strides=2) + self.max_pool2d = nn.MaxPool2d(kernel_size=3, stride=2, pad_mode="valid") self.flatten = nn.Flatten() self.fc1 = fc_with_initialize(6*6*256, 4096) self.fc2 = fc_with_initialize(4096, 4096)