cvae-gan's People
Forkers
shuizhilinxin joydosun kaishui008 franzhahn creeperlin bianjiang1234567 lxxaaa fzingithub 459548764 rex-hou ll752003446 xclmj xiong224 hsvgbkhgbv yuliangxiu kirineko victoryangs3 xiaotailong jiyuw hujh08 yuanqinglee ilan-gold hide927cvae-gan's Issues
y_fake_f & y_fake_p
Hi, thanks for your code for CVAE-GAN, it does help me a lot!
However, there is a question: what are the 'f' and 'p' in 'y_fake_f' and 'y_fake_p' (DisciminatorLossLayer()) means? I think the 'p' maybe means predict, but I have no idea about the 'f'.
Hope you will answer me, thanks again!
class DiscriminatorLossLayer(Layer):
__name__ = 'discriminator_loss_layer'
def __init__(self, **kwargs):
self.is_placeholder = True
super(DiscriminatorLossLayer, self).__init__(**kwargs)
def lossfun(self, y_real, y_fake_f, y_fake_p):
y_pos = K.ones_like(y_real)
y_neg = K.zeros_like(y_real)
loss_real = keras.metrics.binary_crossentropy(y_pos, y_real)
loss_fake_f = keras.metrics.binary_crossentropy(y_neg, y_fake_f)
loss_fake_p = keras.metrics.binary_crossentropy(y_neg, y_fake_p)
return K.mean(loss_real + loss_fake_f + loss_fake_p)
def call(self, inputs):
y_real = inputs[0]
y_fake_f = inputs[1]
y_fake_p = inputs[2]
loss = self.lossfun(y_real, y_fake_f, y_fake_p)
self.add_loss(loss, inputs=inputs)
return y_real
why return x value, not actual loss in loss functions?
Thank you for sharing this code. I'm just confused about the loss calculation classes. In each call function of them, instead of returning the calculated loss, you returned the input x values. Is there any specific reason for this? Or is there anything I misunderstood about Keras call functions?
class ClassifierLossLayer(Layer):
__name__ = 'classifier_loss_layer'
def __init__(self, **kwargs):
self.is_placeholder = True
super(ClassifierLossLayer, self).__init__(**kwargs)
def lossfun(self, c_true, c_pred):
return K.mean(keras.metrics.categorical_crossentropy(c_true, c_pred))
def call(self, inputs):
c_true = inputs[0]
c_pred = inputs[1]
loss = self.lossfun(c_true, c_pred)
self.add_loss(loss, inputs=inputs)
return c_true
ImportError: No module named 'data'
Hi,
I get an error when running train_CVAE-GAN.py
"
File "train_CVAE-GAN.py", line 13, in
from data.gravure import load_data
ImportError: No module named 'data'
"
Do you know how to fix it?
Python tensorflow Version
Hi,
Can you tell me the Python and Tensorflow version that you ran on?
Thank you very much!
load_data
Edit: Nevermind
Problems about GD and GC
In the original paper, the author use GD and GC to match the mean feature of xr and xp. However, I don't see any relations between xr and xp(xr is the real image and xp are generated images from random classes). Can you explain that to me? Thanks a lot!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.