December 2018
Intermediate to advanced
268 pages
8h 23m
English
We've got a training class - let's write some code to use this training class and train the Pix2Pix architecture. Here are the steps needed to run the training class and change the settings:
#!/usr/bin/env python3from train import Trainer# Command Line Argument MethodHEIGHT = 256WIDTH = 256CHANNELS = 3EPOCHS = 100BATCH = 1CHECKPOINT = 50TRAIN_PATH = "/data/cityscapes/cityscapes/train/"TEST_PATH = "/data/cityscapes/cityscapes/val/"trainer = Trainer(height=HEIGHT,width=WIDTH, channels=CHANNELS,epochs =EPOCHS,\ batch=BATCH,\ checkpoint=CHECKPOINT,\ train_data_path=TRAIN_PATH,\ test_data_path=TEST_PATH)trainer.train()
The training class ...
Read now
Unlock full access