Skip to content

Commit f44fcdd

Browse files
style(models): fix style error (Megvii-BaseDetection#1566)
style(models): fix style error
1 parent e80063b commit f44fcdd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
# This workflow contains a single job called "build"
1414
build:
1515
# The type of runner that the job will run on
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-20.04
1717
strategy:
1818
matrix:
1919
python-version: [3.6, 3.7, 3.8]

yolox/models/yolo_head.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ def decode_outputs(self, outputs, dtype):
246246
grids = torch.cat(grids, dim=1).type(dtype)
247247
strides = torch.cat(strides, dim=1).type(dtype)
248248

249-
outputs = torch.cat([(outputs[..., 0:2] + grids) * strides, torch.exp(outputs[..., 2:4]) * strides, outputs[..., 4:]], dim=-1)
249+
outputs = torch.cat([
250+
(outputs[..., 0:2] + grids) * strides,
251+
torch.exp(outputs[..., 2:4]) * strides,
252+
outputs[..., 4:]
253+
], dim=-1)
250254
return outputs
251255

252256
def get_losses(

0 commit comments

Comments
 (0)