ontolearn.nces_trainer

NCES trainer.

Module Contents

Classes

NCESTrainer

NCES trainer.

Functions

before_pad(arg)

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.

static compute_accuracy(prediction, target)[source]
get_optimizer(synthesizer, optimizer='Adam')[source]
show_num_learnable_params()[source]
collate_batch(batch)[source]
map_to_token(idx_array)[source]
train(train_dataloader, save_model=True, optimizer='Adam', record_runtime=True)[source]