Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a80dee7

Browse files
committed
modify
1 parent 7d658ca commit a80dee7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

finetune.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test(imgL,imgR,disp_true):
131131
correct = (disp_true[index[0][:], index[1][:], index[2][:]] < 3)+(disp_true[index[0][:], index[1][:], index[2][:]] < true_disp[index[0][:], index[1][:], index[2][:]]*0.05)
132132
torch.cuda.empty_cache()
133133

134-
return float(torch.sum(correct))/float(len(index[0]))
134+
return 1-(float(torch.sum(correct))/float(len(index[0])))
135135

136136
def adjust_learning_rate(optimizer, epoch):
137137
if epoch <= 200:

models/submodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
def convbn(in_planes, out_planes, kernel_size, stride, pad, dilation):
1111

12-
return nn.Sequential(nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=dilation, dilation = dilation, bias=False),
12+
return nn.Sequential(nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride, padding=dilation if dilation > 1 else pad, dilation = dilation, bias=False),
1313
nn.BatchNorm2d(out_planes))
1414

1515

0 commit comments

Comments
 (0)