dtaoo / dcca Goto Github PK
View Code? Open in Web Editor NEWAn implementation of Deep Canonical Correlation Analysis (DCCA) in Keras with tf backend.
An implementation of Deep Canonical Correlation Analysis (DCCA) in Keras with tf backend.
Hi,
I am trying to run this project to explore DCCA. But model.compile()
fails with the following error.
Traceback (most recent call last):
File "dcca.py", line 73, in <module>
model.compile(optimizer='rmsprop', loss=constant_loss) #, metrics=[mean_pred])
File "/home/psg/anaconda3/lib/python3.7/site-packages/keras/engine/training.py", line 211, in compile
self._cache_output_metric_attributes(metrics, weighted_metrics)
File "/home/psg/anaconda3/lib/python3.7/site-packages/keras/engine/training.py", line 736, in _cache_output_metric_attributes
output_shapes.append(list(output.shape))
File "/home/psg/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/tensor_shape.py", line 838, in __iter__
raise ValueError("Cannot iterate over a shape with unknown rank.")
ValueError: Cannot iterate over a shape with unknown rank.
I am not able to identify the issue.
Python: 3.7.3
Tensorflow: 1.14.0
Keras: 2.3.1
OS: Ubuntu 18.04
Hiya! Thank you for writing this up. I'm finding it interesting to play with.
I'm running into some issues that seem to be related to the "stability fix" in cca_layer.py. When we drop the components with small eigenvalues, it causes problems when we later assume these matrices are square and, also, when we try to multiply them with SigmaHat12 (which doesn't have its shape updated).
I've created a patch, and I'll submit a pull request for you to look at. The change I'm proposing seems to fix some occasional crashes, but I'm not familiar enough with the underlying math to be sure that I haven't screwed up the semantics of what the code is trying to accomplish.
Thanks,
Alex Dodge
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.