Conversation
Note: there is one assertion error when training the model
SANCHES-Pedro
left a comment
There was a problem hiding this comment.
Looking good overall.
I expected a slightly different loss curve for the generator and discrimator of adversarial training. I would expect them to be more symmetrical. But I dont think that's an issue for the tutorial.
| " bias=False,\n", | ||
| " padding=(1, 1, 1),\n", | ||
| ")\n", | ||
| "discriminator.to(device)" |
There was a problem hiding this comment.
(Optional)
I like to put a semicolon ( ; ) at the end to avoid printing too many things on the cell output. I would do:
discriminator.to(device);
There was a problem hiding this comment.
I tried adding the semicolon but when I ran black it removed it.
Add zero_grad to the generator optimizer
|
@SANCHES-Pedro The code is ready to be reviewed again |
Warvito
left a comment
There was a problem hiding this comment.
Looks good, it is just necessary to fix the usage of the variable channel
| check_data = first(val_loader) | ||
| idx = 0 | ||
|
|
||
| img = check_data["image"][idx, channel] |
There was a problem hiding this comment.
This is wrong. the loader returns a image with format 2, 1, 96, 96, 64, if channel has a different value than 0 it will raise an error
| channel = 0 # 0 = Flair | ||
| assert channel in [0, 1, 2, 3], "Choose a valid channel" |
There was a problem hiding this comment.
It is necessary to fix the usage of the variable channel. Currently, your dataloader returns an tensor with format (2, 1, 96, 96, 64) and there is a lot of places where you use [idx, channel]. This will create an error if you change the channel value for anything different from 0.
Implement #27