This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cs501r_f2016:lab7 [2016/10/10 15:50] wingated |
cs501r_f2016:lab7 [2016/11/01 21:44] wingated |
||
---|---|---|---|
Line 120: | Line 120: | ||
- ''H0'': A 2d convolution on ''imgs'' with 32 filters, followed by a leaky relu | - ''H0'': A 2d convolution on ''imgs'' with 32 filters, followed by a leaky relu | ||
- ''H1'': A 2d convolution on ''H0'' with 64 filters, followed by a leaky relu | - ''H1'': A 2d convolution on ''H0'' with 64 filters, followed by a leaky relu | ||
- | - ''H2'': A linear layer from ''H1'' to a 1024 dimensional vector | + | - ''H2'': A linear layer from ''H1'' to a 1024 dimensional vector, followed by a leaky relu |
- ''H3'': A linear layer mapping ''H2'' to a single scalar (per image) | - ''H3'': A linear layer mapping ''H2'' to a single scalar (per image) | ||
- The final output should be a sigmoid of ''H3''. | - The final output should be a sigmoid of ''H3''. | ||
Line 149: | Line 149: | ||
---- | ---- | ||
**Part 4: create your loss functions and training ops** | **Part 4: create your loss functions and training ops** | ||
+ | |||
+ | {{ :cs501r_f2016:lab7_graph.png?200|}} | ||
You should create two loss functions, one for the discriminator, and | You should create two loss functions, one for the discriminator, and | ||
Line 184: | Line 186: | ||
I highly recommend using Tensorboard to visualize your final | I highly recommend using Tensorboard to visualize your final | ||
- | computation graph to make sure you got this right. | + | computation graph to make sure you got this right. Check out my computation graph image on the right - you can see the two discriminator blocks, and you can see that the same variables are feeding into both of them. |
---- | ---- | ||
Line 200: | Line 202: | ||
like this: | like this: | ||
- | '' | + | <code> |
0 1.37 0.71 0.88 | 0 1.37 0.71 0.88 | ||
10 0.90 0.98 1.00 | 10 0.90 0.98 1.00 | ||
Line 222: | Line 224: | ||
... | ... | ||
490 1.25 1.12 0.68 | 490 1.25 1.12 0.68 | ||
- | '' | + | </code> |
Note that we see the struggle between the generator and discriminator | Note that we see the struggle between the generator and discriminator | ||
Line 237: | Line 239: | ||
5000 steps, instead of 500. | 5000 steps, instead of 500. | ||
+ | **Hint for debugging**: if you ever see the cost function for the generator going higher and higher, it means that the discriminator is too powerful. |