Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

import tensorflow as tf 

import hyperchamber as hc 

 

from hypergan.losses.base_loss import BaseLoss 

 

class CramerLoss(BaseLoss): 

 

def _create(self, d_real, d_fake): 

gan = self.gan 

config = self.config 

 

g_loss = d_real - d_fake 

d_loss = -g_loss 

 

return [d_loss, g_loss]