neural_network #25

Merged
s481834 merged 12 commits from neural_network into refactor 2024-06-04 13:23:20 +02:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 24724fb8b7 - Show all commits

BIN
model_2_crops.pth Normal file

Binary file not shown.

View File

@ -11,10 +11,12 @@ import random
imageSize = (128, 128) imageSize = (128, 128)
labels = ['carrot','corn', 'potato', 'tomato'] # musi być w kolejności alfabetycznej labels = ['carrot','corn', 'potato', 'tomato'] # musi być w kolejności alfabetycznej
fertilizer = {labels[0]: 'kompost', labels[1]: 'saletra amonowa', labels[2]: 'superfosfat', labels[3]:'obornik kurzy'} fertilizer = {labels[0]: 'kompost', labels[1]: 'saletra amonowa', labels[2]: 'superfosfat', labels[3]:'obornik kurzy'}
#labels = ['corn','tomato'] #uncomment this two lines for 2 crops only
#fertilizer = {labels[0]: 'kompost', labels[1]: 'saletra amonowa'}
torch.manual_seed(42) torch.manual_seed(42)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu") #device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
device = torch.device("cpu")
# device = torch.device("mps") if torch.backends.mps.is_available() else torch.device('cpu') # device = torch.device("mps") if torch.backends.mps.is_available() else torch.device('cpu')
# print(device) # print(device)