зеркало из https://github.com/microsoft/torchgeo.git
ObjectDetectionTask: increase test coverage for torchvision 0.14+ (#1739)
* fix test coverage in trainers validation step * add tests for multilabelclassificationtask * Minimal bug fix for now * Simpler random code --------- Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
Родитель
19e849a4d4
Коммит
cd1be7a2c4
|
@ -45,9 +45,12 @@ class ObjectDetectionTestModel(Module):
|
|||
else: # eval mode
|
||||
output = []
|
||||
for i in range(batch_size):
|
||||
boxes = torch.rand(10, 4)
|
||||
# xmax, ymax must be larger than xmin, ymin
|
||||
boxes[:, 2:] += 1
|
||||
output.append(
|
||||
{
|
||||
"boxes": torch.rand(10, 4),
|
||||
"boxes": boxes,
|
||||
"labels": torch.randint(0, 2, (10,)),
|
||||
"scores": torch.rand(10),
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче