LBlend / mann-eller-kvinne

🤵 En nettside som bruker maskinlæring til å gjette om du er mann eller kvinne basert på hva du skriver 💃
https://mannellerkvinne.lblend.moe
GNU General Public License v3.0
1 stars 0 forks source link

API won't run due to Tensorflow error - NotImplementedEror: Cannot convert a symbolic Tensor to a numpy array. #33

Closed LBlend closed 3 years ago

LBlend commented 3 years ago

What is wrong?

When trying to run the API, Tensorflow raises a NotImplementedError: Cannot convert a symbolic Tensor (bidirectional/forward_lstm/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported

System info

LBlend commented 3 years ago

I have verified that this is a compatibility issue between packages and not a fault on our end. We should specify the version number for python packages in order to prevent this from happening in the future.

LBlend commented 3 years ago

Because of this, I have resorted to running the 1.0.0 release in production. I have to use a release without Tensorflow

marksverdhei commented 3 years ago

Yep. I actually stumbled upon this problem in another project as well. It's most likely caused by having a too recent version of numpy. I'd suggest making sure to install a tensorflow-compatible numpy version. I fixed it by installing numpy==1.19.5

LBlend commented 3 years ago

Yep. I actually stumbled upon this problem in another project as well. It's most likely caused by having a too recent version of numpy. I'd suggest making sure to install a tensorflow-compatible numpy version. I fixed it by installing numpy==1.19.5

This resolves issue. Great! 👌

I will go ahead and push the changes