IUM_06 - add epochs, learning_rate and weight_decay parameters models/Jenkinsfile, update create_model.py script
This commit is contained in:
parent
bf552fd706
commit
300d8a82d5
@ -5,6 +5,7 @@ import torch.nn as nn
|
||||
import torch.optim as optim
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from sklearn.metrics import classification_report
|
||||
|
||||
@ -34,10 +35,18 @@ y_test = torch.FloatTensor(y_test).view(-1, 1)
|
||||
# Parameters
|
||||
input_size = X_train.shape[1]
|
||||
hidden_size = 128
|
||||
|
||||
# Default parameters
|
||||
learning_rate = 0.001
|
||||
weight_decay = 0.001
|
||||
num_epochs = 1000
|
||||
|
||||
# Parameters from sys.argv
|
||||
if len(sys.argv) > 1:
|
||||
num_epochs = int(sys.argv[1])
|
||||
learning_rate = float(sys.argv[2])
|
||||
weight_decay = float(sys.argv[3])
|
||||
|
||||
# Model initialization
|
||||
model = NeuralNetwork(input_size, hidden_size)
|
||||
|
||||
|
4
models/Jenkinsfile
vendored
4
models/Jenkinsfile
vendored
@ -1,6 +1,10 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
parameters {
|
||||
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Clone repository') {
|
||||
steps {
|
||||
|
Loading…
Reference in New Issue
Block a user