assure that epochs is saved
Some checks failed
s444354-training/pipeline/head There was a failure building this commit
Some checks failed
s444354-training/pipeline/head There was a failure building this commit
This commit is contained in:
parent
718378d69a
commit
2a5e48f63c
@ -38,7 +38,7 @@ except:
|
||||
@ex.config
|
||||
def my_config():
|
||||
epochs = numberOfEpochParam
|
||||
my_config()
|
||||
|
||||
|
||||
|
||||
dataframe_raw = pd.read_csv("winequality-red.csv")
|
||||
@ -150,7 +150,7 @@ def evaluate(model, val_loader):
|
||||
return model.validation_epoch_end(outputs)
|
||||
|
||||
@ex.capture
|
||||
def fit(epochs, lr, model, train_loader, val_loader,_run, opt_func=torch.optim.SGD):
|
||||
def fit(epochs, lr, model, train_loader, val_loader, _run, opt_func=torch.optim.SGD):
|
||||
history = []
|
||||
optimizer = opt_func(model.parameters(), lr)
|
||||
for epoch in range(epochs):
|
||||
@ -216,6 +216,7 @@ with open("result.txt", "w+") as file:
|
||||
@ex.main
|
||||
def main():
|
||||
lr = 1e-6
|
||||
my_config()
|
||||
history5 = fit(epochs, lr, model, train_loader, val_loader)
|
||||
|
||||
ex.run()
|
||||
|
Loading…
Reference in New Issue
Block a user