Issue with installation and missing keras loss
Hi! I just installed the repo (after cloning the latest version) and the latest tensorflow (2.18), keras 3.8.0. Doing:
./scripts/tf/register.py --help
Returns:
.env/lib/python3.11/site-packages/neurite/tf/metrics.py", line 33, in <module>
from tensorflow.keras.losses import mean_absolute_error as l1
ImportError: cannot import name 'mean_absolute_error' from 'tensorflow.keras.losses' (.env/lib/python3.11/site-packages/keras/_tf_keras/keras/losses/__init__.py)
Is there a specific keras version to use?
Thanks! Pierre
same problem. hope to solve
I only interacted with the library on Colab. As such I am not certain what I'll say works for you. In the main voxelmorph tutorial, there is this problem as well. To solve you can use:
!pip -q install git+https://github.com/adalca/neurite.git@0776a575eadc3d10d6851a4679b7a305f3a31c65
!pip -q install git+https://github.com/voxelmorph/voxelmorph.git@375a1492bb8781cbbaf22f0ca2973e5121484f99
It will install the libraries but do not rely too much on the main VoxelMorph tutorial as it is now out of date and needs some modifications. These are technically not the latest versions but are the second to last commit, the last commits being inconsequential changes. I just give you what I uses and know works.