Zaktualizuj 'DL.py'

This commit is contained in:
Kornelia Girejko 2022-05-06 20:16:11 +02:00
parent 86fde858c2
commit 163ac4d8e4

4
DL.py
View File

@ -8,6 +8,8 @@ from sklearn import preprocessing
from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
EPOCHS = int(sys.argv[1])
# Model
class Model(nn.Module):
def __init__(self):
@ -56,7 +58,7 @@ criterion = nn.BCELoss()
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
# Trening
num_epochs = 1000
num_epochs = EPOCHS
for epoch in range(num_epochs):
y_predicted = model(X_training)
loss = criterion(y_predicted,y_training)