Skip to content

Commit 03f5f8c

Browse files
Fix issue #452 for PyTorch 0.4.0
1 parent 81c9033 commit 03f5f8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎lib/roi_data_layer/roibatchLoader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, roidb, ratio_list, ratio_index, batch_size, num_classes, trai
5151
# for ratio cross 1, we make it to be 1.
5252
target_ratio = 1
5353

54-
self.ratio_list_batch[left_idx:(right_idx+1)] = target_ratio
54+
self.ratio_list_batch[left_idx:(right_idx+1)] = torch.tensor(target_ratio.astype(np.float64)) # trainset ratio list ,each batch is same number
5555

5656

5757
def __getitem__(self, index):

0 commit comments

Comments
 (0)