This commit is contained in:
parent
099bfb8540
commit
1060ec9976
@ -10,6 +10,7 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
|
cleanWs()
|
||||||
git 'https://git.wmi.amu.edu.pl/s434749/ium_434749.git'
|
git 'https://git.wmi.amu.edu.pl/s434749/ium_434749.git'
|
||||||
copyArtifacts fingerprintArtifacts: true, projectName: 's434749-create-dataset', selector: lastSuccessful()
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434749-create-dataset', selector: lastSuccessful()
|
||||||
sh "python3 train_model.py with 'batch_size=${params.batch_size}' 'learning_rate=${params.learning_rate}' 'epochs=${params.epochs}'"
|
sh "python3 train_model.py with 'batch_size=${params.batch_size}' 'learning_rate=${params.learning_rate}' 'epochs=${params.epochs}'"
|
||||||
|
@ -77,7 +77,7 @@ def encode(batch: [(torch.tensor, str)], in_alphabet, max_len):
|
|||||||
|
|
||||||
def encode_str(batch: [(str, str)], in_alphabet, max_len):
|
def encode_str(batch: [(str, str)], in_alphabet, max_len):
|
||||||
batch = [(torch.tensor([in_alphabet[letter] for letter in in_str], dtype=torch.int), out_str) for in_str, out_str in batch]
|
batch = [(torch.tensor([in_alphabet[letter] for letter in in_str], dtype=torch.int), out_str) for in_str, out_str in batch]
|
||||||
return encode(batch)
|
return encode(batch, in_alphabet, max_len)
|
||||||
|
|
||||||
|
|
||||||
def train_model(model, learning_rate, in_alphabet, max_len, data, epochs, batch_size):
|
def train_model(model, learning_rate, in_alphabet, max_len, data, epochs, batch_size):
|
||||||
|
Loading…
Reference in New Issue
Block a user