pytorch-transformers-classification
pytorch-transformers-classification copied to clipboard
AttributeError: module 'torch.nn.functional' has no attribute 'one_hot'
if args['do_train']: train_dataset = load_and_cache_examples(task, tokenizer) global_step, tr_loss = train(train_dataset, model, tokenizer) logger.info(" global_step = %s, average loss = %s", global_step, tr_loss)
I still get this error when running this step despite having torch 1.3.0 and torchvision 0.4.1. Has anyone found a solution for this error?
This may be caused by an update to the Hugging Face Transformers library. Please consider using Simple Transformers as this repo may not be compatible with the current Hugging Face library.