Skip to content
Snippets Groups Projects
Commit 503508f5 authored by Caroline DE POURTALES's avatar Caroline DE POURTALES
Browse files

test

parent c5851000
No related branches found
No related tags found
3 merge requests!6Linker with transformer,!5Linker with transformer,!3Working on padding
train.py 0 → 100644
import torch
from Configuration import Configuration
from Linker import *
from utils import read_csv_pgbar
torch.cuda.empty_cache()
batch_size = int(Configuration.modelTrainingConfig['batch_size'])
nb_sentences = batch_size * 800
epochs = int(Configuration.modelTrainingConfig['epoch'])
file_path_axiom_links = 'Datasets/goldANDsilver_dataset_links.csv'
df_axiom_links = read_csv_pgbar(file_path_axiom_links, nb_sentences)
print("Linker")
linker = Linker("models/flaubert_super_98_V2_50e.pt")
print("\nLinker Training\n")
linker.train_linker(df_axiom_links, validation_rate=0.1, epochs=epochs, batch_size=batch_size, checkpoint=False, tensorboard=True)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment