Skip to content

Commit

Permalink
fix deeplabv3 (#760)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaitinZhao authored Mar 1, 2024
1 parent ae3db13 commit 022b594
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# system
seed: 1
mode: 1
mode: 0
distribute: True
num_parallel_workers: 8
device_target: "Ascend"
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# system
seed: 1
mode: 1
mode: 0
distribute: True
num_parallel_workers: 8
device_target: "Ascend"
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# system
seed: 1
mode: 1
mode: 0
distribute: True
num_parallel_workers: 8
device_target: "Ascend"
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# system
seed: 1
mode: 1
mode: 0
distribute: True
num_parallel_workers: 8
device_target: "Ascend"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/seg/deeplabv3/deeplabv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 022b594

Please sign in to comment.