ElofssonLab / PconsC4

Fast and easy contact prediction.
GNU General Public License v3.0
35 stars 10 forks source link

'Model' object has no attribute 'layers_by_depth' #1

Closed kad-ecoli closed 6 years ago

kad-ecoli commented 6 years ago

I have installed pconsc4 on anaconda python 3.6, using keras 2.2.0 and tensorflow 1.8.0. When I try to invoke

python3.6 -c "import pconsc4;model=pconsc4.get_pconsc4()"

It complaints

Traceback (most recent call last): File "", line 1, in File "/home/zcx/Projects/EVfold/ext/PconsC4/miniconda3.6/lib/python3.6/site-packages/pconsc4/create_model.py", line 222, in get_pconsc4 contact_model, ss_model = _wrap_model(unet, binary_cutoffs) File "/home/zcx/Projects/EVfold/ext/PconsC4/miniconda3.6/lib/python3.6/site-packages/pconsc4/create_model.py", line 68, in _wrap_model bottleneck_model, ss_model = create_ss_model() File "/home/zcx/Projects/EVfold/ext/PconsC4/miniconda3.6/lib/python3.6/site-packages/pconsc4/create_model.py", line 115, in create_ss_model seq_feature_model = ss_model.layers_by_depth[5][0] AttributeError: 'Model' object has no attribute 'layers_by_depth'

Does Pconsc4 depend on specific version of keras or tensorflow? If yes, please specify it.

kad-ecoli commented 6 years ago

Seems like the most recent tensorflow replace layers_by_depth by _layers_by_depth. Created a pull request at https://github.com/ElofssonLab/PconsC4/pull/2