MCPcopy
hub / github.com/pytorch/vision / test_fasterrcnn_double

Function test_fasterrcnn_double

test/test_models.py:559–572  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

557
558
559def test_fasterrcnn_double():
560 model = models.detection.fasterrcnn_resnet50_fpn(num_classes=50, weights=None, weights_backbone=None)
561 model.double()
562 model.eval()
563 input_shape = (3, 300, 300)
564 x = torch.rand(input_shape, dtype=torch.float64)
565 model_input = [x]
566 out = model(model_input)
567 assert model_input[0] is x
568 assert len(out) == 1
569 assert "boxes" in out[0]
570 assert "scores" in out[0]
571 assert "labels" in out[0]
572 _check_input_backprop(model, model_input)
573
574
575def test_googlenet_eval():

Callers

nothing calls this directly

Calls 1

_check_input_backpropFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…