-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notebook review #6
base: main
Are you sure you want to change the base?
Conversation
def parse(self, args=None):
if args is None and "ipykernel_launcher" in sys.argv[0]:
args = [] # Ignore command line arguments in Jupyter
elif args is None:
args = sys.argv[1:]
self.initialize()
self.opt = self.parser.parse_args(args)
return self.opt |
Encountering this issue...
|
I think you need to update https://github.com/Tonks684/GANs_MI2I because I don't have that extra |
hmm, I now realize that those are part of the
|
Couldn't run the training {
"name": "UnboundLocalError",
"message": "local variable 'train_loss_D_fake' referenced before assignment",
"stack": "---------------------------------------------------------------------------
UnboundLocalError Traceback (most recent call last)
Cell In[11], line 2
1 # %%
----> 2 train_model(
3 opt,
4 phase2nuclei_model,
5 visualizer,
6 dataset_train,
7 dataset_val,
8 optimizer_G,
9 optimizer_D,
10 start_epoch,
11 epoch_iter,
12 writer,
13 )
File ~/data/06_image_translation/GAN_code/GANs_MI2I/pix2pixHD/train_dlmbl.py:341, in train(opt, model, visualizer, dataset_train, dataset_val, optimizer_G, optimizer_D, start_epoch, epoch_iter, writer)
336 epoch_generator = {\"train\": train_loss_G_Feat, \"validation\": val_loss_G_Feat}
337 writer.add_scalars(\"Generator Feature Matching Loss\", epoch_generator, epoch)
339 print(
340 \"Training Losses: D_fake: {}, D_real: {}, G_GAN: {}, G_GAN_Feat: {}, G_VGG: {}\".format(
--> 341 train_loss_D_fake,
342 train_loss_D_real,
343 train_loss_G_GAN,
344 train_loss_G_Feat,
345 train_loss_G_VGG,
346 )
347 )
348 print(
349 \"Validation Losses: D_fake: {}, D_real: {}, G_GAN: {}, G_GAN_Feat: {}, G_VGG: {}\".format(
350 val_loss_D_fake,
(...)
355 )
356 )
357 print(
358 \"End of epoch %d / %d \\t Time Taken: %d sec\"
359 % (epoch, opt.niter + opt.niter_decay, time.time() - epoch_start_time)
360 )
UnboundLocalError: local variable 'train_loss_D_fake' referenced before assignment"
} |
Hey Ed, Commit 9de0694 should now have a working setup.sh. |
This PR reviews the current img2img translation part 2 (GAN approach) notebook for the DLMBL course.