14 lines
282 B
Python
14 lines
282 B
Python
from torchvision import transforms
|
|
from settings import (
|
|
IMAGE_TARGET_SIZE,
|
|
)
|
|
|
|
|
|
TRANSFORM = transforms.Compose(
|
|
[
|
|
transforms.Resize((IMAGE_TARGET_SIZE, IMAGE_TARGET_SIZE)),
|
|
transforms.Grayscale(num_output_channels=1),
|
|
transforms.ToTensor(),
|
|
]
|
|
)
|