Skip to content

Instantly share code, notes, and snippets.

@arunm8489
Created June 4, 2020 02:48
Show Gist options
  • Save arunm8489/2bddd6bd0cc04168b7f3d03634dbf5c4 to your computer and use it in GitHub Desktop.
Save arunm8489/2bddd6bd0cc04168b7f3d03634dbf5c4 to your computer and use it in GitHub Desktop.
#eg detection input dimension [1, 255, 13, 13]
prediction = x.view(batch_size, bbox_attrs*num_anchors, grid_size*grid_size) # 1x255x169
prediction = prediction.transpose(1,2).contiguous() #1x169x255
prediction = prediction.view(batch_size, grid_size*grid_size*num_anchors, bbox_attrs) #1x507x85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment