vae
vae copied to clipboard
a simple vae and cvae from keras
苏老师,您好! 在运行vae_keras_cluster.py时,发生报错 `print 'train acc: %s' % (right / len(y_train_))` `SyntaxError: invalid syntax`,这是属于版本错误吗?谢谢老师和各位大佬帮助!!!
请问如何解决还是python和tensorflow可直接使用最新版呢?
~~~ # [vae](https://github.com/bojone/vae)/vae_vmf_keras.py def sampling(mu): """vMF分布重参数操作 """ dims = K.int_shape(mu)[-1] # 预先计算一批w epsilon = 1e-7 x = np.arange(-1 + epsilon, 1, epsilon) y = kappa * x + np.log(1 -...
Hello, I am using CVAE to generate data of dataframe type. I observed loss and val_ Loss converges to about 7.5 and no longer decreases. I want to ask you...
83行`y_test_`修改为`y_test`,可以正常运行,否则报错。 测试平台:kaggle
请问vae_keras_celeba.py中, recon_loss = 0.5 * K.sum(K.mean(x_out**2, 0)) + 0.5 * np.log(2*np.pi) * np.prod(K.int_shape(x_out)[1:]) 为何recon_loss要加上0.5 * np.log(2*np.pi) * np.prod(K.int_shape(x_out)[1:])? 那一项不是常数吗? 对训练有作用吗?
是有什么玄机吗?感觉梯度是消不掉的呀
your code: class VectorQuantizer(Layer): def __init__(self, num_codes, **kwargs): super(VectorQuantizer, self).__init__(**kwargs) self.num_codes = num_codes def build(self, input_shape): super(VectorQuantizer, self).build(input_shape) dim = input_shape[-1] self.embeddings = self.add_weight( name='embeddings', shape=(self.num_codes, dim), initializer='uniform') def call(self,...
accuracy
hello!I wonder how to calculate the accuracy rate in cvae_keras.py ? How to output the accuracy rate every epoch ?
苏老师:您好! img_align_celeba/*.jpg 这些图片能公开吗?我的QQ:[email protected] ,非常感谢。