/style.py Secret
Last active
May 20, 2021 15:54
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