diff --git a/examples/seg/deeplabv3/config/deeplabv3_s16_dilated_resnet101.yaml b/examples/seg/deeplabv3/config/deeplabv3_s16_dilated_resnet101.yaml index 186175c48..9bfc3b5bb 100644 --- a/examples/seg/deeplabv3/config/deeplabv3_s16_dilated_resnet101.yaml +++ b/examples/seg/deeplabv3/config/deeplabv3_s16_dilated_resnet101.yaml @@ -2,7 +2,7 @@ # system seed: 1 -mode: 1 +mode: 0 distribute: True num_parallel_workers: 8 device_target: "Ascend" @@ -33,7 +33,7 @@ output_stride: 16 model: "deeplabv3" ckpt_pre_trained: False ckpt_path: "" -amp_level: "O3" +amp_level: "O2" amp_cast_list: None # scheduler diff --git a/examples/seg/deeplabv3/config/deeplabv3_s8_dilated_resnet101.yaml b/examples/seg/deeplabv3/config/deeplabv3_s8_dilated_resnet101.yaml index be44da9cf..17c34a93c 100644 --- a/examples/seg/deeplabv3/config/deeplabv3_s8_dilated_resnet101.yaml +++ b/examples/seg/deeplabv3/config/deeplabv3_s8_dilated_resnet101.yaml @@ -2,7 +2,7 @@ # system seed: 1 -mode: 1 +mode: 0 distribute: True num_parallel_workers: 8 device_target: "Ascend" @@ -33,7 +33,7 @@ output_stride: 8 model: "deeplabv3" ckpt_pre_trained: True ckpt_path: "/path/to/pre_trained.ckpt" -amp_level: "O3" +amp_level: "O2" amp_cast_list: None # scheduler diff --git a/examples/seg/deeplabv3/config/deeplabv3plus_s16_dilated_resnet101.yaml b/examples/seg/deeplabv3/config/deeplabv3plus_s16_dilated_resnet101.yaml index 3dfcf277c..35c5bce58 100644 --- a/examples/seg/deeplabv3/config/deeplabv3plus_s16_dilated_resnet101.yaml +++ b/examples/seg/deeplabv3/config/deeplabv3plus_s16_dilated_resnet101.yaml @@ -2,7 +2,7 @@ # system seed: 1 -mode: 1 +mode: 0 distribute: True num_parallel_workers: 8 device_target: "Ascend" @@ -33,7 +33,7 @@ output_stride: 16 model: "deeplabv3plus" ckpt_pre_trained: False ckpt_path: "" -amp_level: "O3" +amp_level: "O2" amp_cast_list: None # scheduler diff --git a/examples/seg/deeplabv3/config/deeplabv3plus_s8_dilated_resnet101.yaml b/examples/seg/deeplabv3/config/deeplabv3plus_s8_dilated_resnet101.yaml index 2dff57ded..8d5fd9e4c 100644 --- a/examples/seg/deeplabv3/config/deeplabv3plus_s8_dilated_resnet101.yaml +++ b/examples/seg/deeplabv3/config/deeplabv3plus_s8_dilated_resnet101.yaml @@ -2,7 +2,7 @@ # system seed: 1 -mode: 1 +mode: 0 distribute: True num_parallel_workers: 8 device_target: "Ascend" @@ -33,7 +33,7 @@ output_stride: 8 model: "deeplabv3plus" ckpt_pre_trained: True ckpt_path: "/path/to/pre_trained.ckpt" -amp_level: "O3" +amp_level: "O2" amp_cast_list: None # scheduler diff --git a/examples/seg/deeplabv3/deeplabv3.py b/examples/seg/deeplabv3/deeplabv3.py index 0a637f91c..10df2fd45 100644 --- a/examples/seg/deeplabv3/deeplabv3.py +++ b/examples/seg/deeplabv3/deeplabv3.py @@ -95,7 +95,7 @@ def __init__( def construct(self, x): size = ops.shape(x) - out = nn.AvgPool2d(size[2])(x) + out = ops.mean(x, (2, 3), True) out = self.conv(out) out = ops.ResizeNearestNeighbor((size[2], size[3]), True)(out) return out