ontolearn.nces_trainer

NCES trainer.

Classes

NCESTrainer

NCES trainer.

Functions

before_pad(arg)

Module Contents

ontolearn.nces_trainer.before_pad(arg)[source]
class ontolearn.nces_trainer.NCESTrainer(nces, epochs=300, learning_rate=0.0001, decay_rate=0, clip_value=5.0, num_workers=8, storage_path='./')[source]

NCES trainer.

nces
epochs
learning_rate
decay_rate
clip_value
num_workers
storage_path
static compute_accuracy(prediction, target)[source]
get_optimizer(synthesizer, optimizer='Adam')[source]
static show_num_learnable_params(model)[source]
collate_batch(batch)[source]
map_to_token(idx_array)[source]
train(train_dataloader, save_model=True, optimizer='Adam', record_runtime=True)[source]