emiliendupont / vae-concrete Goto Github PK
View Code? Open in Web Editor NEWKeras implementation of a Variational Auto Encoder with a Concrete Latent Distribution
Keras implementation of a Variational Auto Encoder with a Concrete Latent Distribution
when running main.py I get this error:
Caused by op u'loss_2/generated_loss/logistic_loss/mul', defined at:
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1599, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1026, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Users/andrei/code/third_party/vae-concrete/main.py", line 6, in <module>
model.fit(x_train, num_epochs=1)
File "/Users/andrei/code/third_party/vae-concrete/vae_concrete.py", line 62, in fit
self.model.compile(optimizer=self.opt, loss=self._vae_loss)
File "/usr/local/lib/python2.7/site-packages/keras/engine/training.py", line 850, in compile
sample_weight, mask)
File "/usr/local/lib/python2.7/site-packages/keras/engine/training.py", line 450, in weighted
score_array = fn(y_true, y_pred)
File "/Users/andrei/code/third_party/vae-concrete/vae_concrete.py", line 195, in _vae_loss
binary_crossentropy(x, x_generated)
File "/usr/local/lib/python2.7/site-packages/keras/losses.py", line 57, in binary_crossentropy
return K.mean(K.binary_crossentropy(y_true, y_pred), axis=-1)
File "/usr/local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 2822, in binary_crossentropy
logits=output)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/nn_impl.py", line 171, in sigmoid_cross_entropy_with_logits
return math_ops.add(relu_logits - logits * labels,
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/math_ops.py", line 838, in binary_op_wrapper
return func(x, y, name=name)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/math_ops.py", line 1061, in _mul_dispatch
return gen_math_ops._mul(x, y, name=name)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_math_ops.py", line 1377, in _mul
result = _op_def_lib.apply_op("Mul", x=x, y=y, name=name)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1269, in __init__
self._traceback = _extract_stack()
InvalidArgumentError (see above for traceback): Incompatible shapes: [72900] vs. [78400]
[[Node: loss_2/generated_loss/logistic_loss/mul = Mul[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](loss_2/generated_loss/Log, loss_2/generated_loss/Reshape)]]
also any plans to update for latest keras and tensorflow?
Hi Emilien! Just wanted to first say thanks for the repository. It's a very clean implementation, that I found very helpful to understand the main trick within CONCRETE.
I am using VAEs to create embeddings of natural histopathology images (over at https://github.com/willgdjones/HistoVAE), and I'm interested in the hyper-parameters you have used to create high-quality decodings. These are 128x128 pixel images, and so not unlike images that you might find in CIFAR100. I am about to try to implement vae-concrete and see if that helps, but I wanted to ask in case you had any other specific advice. The encodings that you generate as part of JointVAE are exactly what I'm looking for (so I might go ahead and try that too!).
Thanks,
Will
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.