2

I'm trying to run code that is supposed to identify different types of image categories. The code is of VGG16 and I have the following error. Of course I tried to install and import directories (keras etc...)and the error still exists. Would appreciate help. Thanks.

This is the line of code that is marked

vgg16 = applications.VGG16(include_top=False, weights='data3/')

And that's the error

AttributeError: module 'keras.applications' has no attribute 'VGG16'

Tal Shaul
  • 21
  • 1
  • 3

2 Answers2

2

It should be applications.vgg16.VGG16(...).

user1635327
  • 1,469
  • 3
  • 11
1

I solved same issue with from tensorflow.keras import applications instead of from keras import applications

ant0nk
  • 134
  • 1
  • 7