Skip to content

Commit 56b1531

Browse files
authored
cleanup merge
1 parent 3f653a7 commit 56b1531

1 file changed

Lines changed: 3 additions & 26 deletions

File tree

efficientnet/utils_extra.py

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,10 @@ def __init__(self, in_channels, out_channels, kernel_size, stride=1, bias=True,
3232

3333
def forward(self, x):
3434
h, w = x.shape[-2:]
35-
36-
<<<<<<< HEAD
37-
<<<<<<< HEAD
35+
3836
extra_h = (w - 1) * self.stride[1] - w + self.kernel_size[1]
3937
extra_v = (h - 1) * self.stride[0] - h + self.kernel_size[0]
40-
=======
41-
extra_h = (math.ceil(w / self.stride[1]) - 1) * self.stride[1] - w + self.kernel_size[1]
42-
extra_v = (math.ceil(h / self.stride[0]) - 1) * self.stride[0] - h + self.kernel_size[0]
43-
44-
extra_h = h_cover_len - w
45-
extra_v = v_cover_len - h
46-
>>>>>>> 21771ddb20591a2ff85cb2227f586e63f72c94f8
47-
=======
48-
extra_h = (math.ceil(w / self.stride[1]) - 1) * self.stride[1] - w + self.kernel_size[1]
49-
extra_v = (math.ceil(h / self.stride[0]) - 1) * self.stride[0] - h + self.kernel_size[0]
50-
>>>>>>> dc738a48daad9cc3530dd1beee5f4235b363687a
51-
38+
5239
left = extra_h // 2
5340
right = extra_h - left
5441
top = extra_v // 2
@@ -84,19 +71,9 @@ def __init__(self, *args, **kwargs):
8471

8572
def forward(self, x):
8673
h, w = x.shape[-2:]
87-
88-
<<<<<<< HEAD
89-
<<<<<<< HEAD
74+
9075
extra_h = (w - 1) * self.stride[1] - w + self.kernel_size[1]
9176
extra_v = (h - 1) * self.stride[0] - h + self.kernel_size[0]
92-
=======
93-
extra_h = (math.ceil(w / self.stride[1]) - 1) * self.stride[1] - w + self.kernel_size[1]
94-
extra_v = (math.ceil(h / self.stride[0]) - 1) * self.stride[0] - h + self.kernel_size[0]
95-
>>>>>>> 21771ddb20591a2ff85cb2227f586e63f72c94f8
96-
=======
97-
extra_h = (math.ceil(w / self.stride[1]) - 1) * self.stride[1] - w + self.kernel_size[1]
98-
extra_v = (math.ceil(h / self.stride[0]) - 1) * self.stride[0] - h + self.kernel_size[0]
99-
>>>>>>> dc738a48daad9cc3530dd1beee5f4235b363687a
10077

10178
left = extra_h // 2
10279
right = extra_h - left

0 commit comments

Comments
 (0)