Skip to content

Instantly share code, notes, and snippets.

@Tob-iee
Created September 13, 2023 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tob-iee/fdd542546ad6b4307960ddc3d5cd302c to your computer and use it in GitHub Desktop.
Save Tob-iee/fdd542546ad6b4307960ddc3d5cd302c to your computer and use it in GitHub Desktop.
Initialize the training callback and train the model.
# initialize trainer callback
picsellia_callback = detr.CustomPicselliaCallback(experiment=experiment)
trainer = Trainer(
model=model,
args=training_args,
data_collator=collate_fn,
train_dataset=train_dataset,
tokenizer=image_processor,
callbacks=[picsellia_callback],
)
trainer.train()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment