MCPcopy Create free account
hub / github.com/pytorch/examples / input_transform

Function input_transform

super_resolution/data.py:38–43  ·  view source on GitHub ↗
(crop_size, upscale_factor)

Source from the content-addressed store, hash-verified

36
37
38def input_transform(crop_size, upscale_factor):
39 return Compose([
40 CenterCrop(crop_size),
41 Resize(crop_size // upscale_factor),
42 ToTensor(),
43 ])
44
45
46def target_transform(crop_size):

Callers 2

get_training_setFunction · 0.85
get_test_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected