Skip to content

Instantly share code, notes, and snippets.

@mapmeld
Last active July 16, 2020 18:29
Show Gist options
  • Save mapmeld/8265d022914a5b37bcadd0f25120da9b to your computer and use it in GitHub Desktop.
Save mapmeld/8265d022914a5b37bcadd0f25120da9b to your computer and use it in GitHub Desktop.
PythonCode
from simpletransformers.classification import ClassificationModel
# set use_cuda=False on CPU-only platforms
model = ClassificationModel('bert', 'monsoon-nlp/dv-wave', num_labels=8, use_cuda=True, args={
'reprocess_input_data': True,
'use_cached_eval_features': False,
'overwrite_output_dir': True,
'num_train_epochs': 3,
'silent': True
})
model.train_model(train)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment