DTaoo/DCCA

Model compilation fails

Opened this issue · 0 comments

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