Skip to content
Advertisement

Cannot use vggface-keras in Tensorflow 2.0

I am trying to use the keras-vggface library from https://github.com/rcmalli/keras-vggface to train a CNN. I have installed tensorflow 2.0.0-rc1, keras 2.3.1, cuda 10.1, cudnn 7.6.5 and the driver’s version is 418, the problem is that when i try to use the vggface model, as a convolutional base, i get an error, here is the code and the error

JavaScript

Error!

JavaScript

I hope you can tell me why i get this error and how to solve it, thanks for reading.

Advertisement

Answer

The problem is incompatibility between keras and tf.keras. The library you are using (vggface-keras), uses keras, while your code uses tf.keras. This won’t work.

The only possible solutions is you to use keras for your whole pipeline, or for you to modify the vggface-keras library to use tf.keras, including modifying all imports and fixing any bugs that appear.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement