-
-
Save aribornstein/12191205af2f6fa38e1f3ac751cbf9a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the data | |
data_module = StyleTransferData.from_folders(train_folder="data/coco128/images", batch_size=4) | |
# Build the model | |
model = StyleTransfer(style_image=style_image, backbone="vgg16") | |
# Create the trainer and train | |
trainer = flash.Trainer(max_epochs=2) | |
trainer.fit(model, data_module) | |
# Save it! | |
trainer.save_checkpoint("style_transfer_model.pt") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment