mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
add back normalization and negate it in test
This commit is contained in:
2
test/external/external_test_datasets.py
vendored
2
test/external/external_test_datasets.py
vendored
@@ -122,7 +122,7 @@ class TestOpenImagesDataset(ExternalTestDatasets):
|
||||
return iter(dataloader)
|
||||
|
||||
def test_training_set(self):
|
||||
img_size, img_mean, img_std, anchors = (800, 800), [0.485, 0.456, 0.406], [0.229, 0.224, 0.225], torch.ones((120087, 4))
|
||||
img_size, img_mean, img_std, anchors = (800, 800), [0.0, 0.0, 0.0], [1.0, 1.0, 1.0], torch.ones((120087, 4))
|
||||
tinygrad_dataloader, ref_dataloader = self._create_tinygrad_dataloader("train", anchors.numpy()), self._create_ref_dataloader("train")
|
||||
transform = GeneralizedRCNNTransform(img_size, img_mean, img_std)
|
||||
|
||||
|
||||
2
test/external/mlperf_retinanet/transforms.py
vendored
2
test/external/mlperf_retinanet/transforms.py
vendored
@@ -181,7 +181,7 @@ class GeneralizedRCNNTransform(nn.Module):
|
||||
if image.dim() != 3:
|
||||
raise ValueError("images is expected to be a list of 3d tensors "
|
||||
"of shape [C, H, W], got {}".format(image.shape))
|
||||
# image = self.normalize(image)
|
||||
image = self.normalize(image)
|
||||
image, target_index = self.resize(image, target_index)
|
||||
images[i] = image
|
||||
if targets is not None and target_index is not None:
|
||||
|
||||
Reference in New Issue
Block a user