mohitsharma916:

Variable(torch.from_numpy(idx).byte().cuda()


One more question:
In the line
LG_semi_arr = out_img_map_lsmax.masked_select(Variable(torch.from_numpy(idx).byte().cuda()))

Is Variable(torch.from_numpy(idx).byte().cuda()) deallocated after the current iteration is done?