neural_network #4

Merged
s452622 merged 34 commits from neural_network into master 2021-06-08 23:47:22 +02:00
Showing only changes of commit dc63ed15bf - Show all commits

View File

@ -0,0 +1,24 @@
import os
from torchvision.transforms import transforms
main_path = os.path.dirname(os.path.abspath(__file__))
img_main_path = os.path.dirname(main_path)
for i in range(2):
img_main_path = os.path.dirname(img_main_path)
img_main_path = os.path.join(img_main_path, 'images/learning')
train_path = os.path.join(img_main_path, 'training')
test_path = os.path.join(img_main_path, 'test')
prediction_path = os.path.join(img_main_path, 'prediction')
transformer = transforms.Compose([
transforms.Resize((150, 150)),
transforms.RandomHorizontalFlip(),
transforms.ToTensor(),
transforms.Normalize([0.5, 0.5, 0.5],
[0.5, 0.5, 0.5])
])