Zaktualizuj 'DL.py'
This commit is contained in:
parent
86fde858c2
commit
163ac4d8e4
4
DL.py
4
DL.py
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user