Ge Zheng commited on
Commit
2a7e607
·
1 Parent(s): 26cc346

style(models): fix style error (#1566)

Browse files
.github/workflows/ci.yaml CHANGED
@@ -13,7 +13,7 @@ jobs:
13
  # This workflow contains a single job called "build"
14
  build:
15
  # The type of runner that the job will run on
16
- runs-on: ubuntu-latest
17
  strategy:
18
  matrix:
19
  python-version: [3.6, 3.7, 3.8]
 
13
  # This workflow contains a single job called "build"
14
  build:
15
  # The type of runner that the job will run on
16
+ runs-on: ubuntu-20.04
17
  strategy:
18
  matrix:
19
  python-version: [3.6, 3.7, 3.8]
yolox/models/yolo_head.py CHANGED
@@ -246,7 +246,11 @@ class YOLOXHead(nn.Module):
246
  grids = torch.cat(grids, dim=1).type(dtype)
247
  strides = torch.cat(strides, dim=1).type(dtype)
248
 
249
- outputs = torch.cat([(outputs[..., 0:2] + grids) * strides, torch.exp(outputs[..., 2:4]) * strides, outputs[..., 4:]], dim=-1)
 
 
 
 
250
  return outputs
251
 
252
  def get_losses(
 
246
  grids = torch.cat(grids, dim=1).type(dtype)
247
  strides = torch.cat(strides, dim=1).type(dtype)
248
 
249
+ outputs = torch.cat([
250
+ (outputs[..., 0:2] + grids) * strides,
251
+ torch.exp(outputs[..., 2:4]) * strides,
252
+ outputs[..., 4:]
253
+ ], dim=-1)
254
  return outputs
255
 
256
  def get_losses(