-
-
Save arunm8489/9241a1a5bff51b8faace978ebe3336da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Concatenate the batch_id of the image to the detection#this helps us identify which image does the detection correspond to | |
#We use a linear straucture to hold ALL the detections from the batch | |
#the batch_dim is flattened | |
#batch is identified by extra batch column | |
#creating a row with index of images | |
batch_ind = image_pred_class.new(image_pred_class.size(0), 1).fill_(ind) | |
seq = batch_ind, image_pred_class | |
if not write: | |
output = torch.cat(seq,1) | |
write = True | |
else: | |
out = torch.cat(seq,1) | |
output = torch.cat((output,out)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment