below is my code, it’s running normally in google colab but it’s giving error in pycharm.
the code is:
import tensorflow as tf
import tensorflow_hub as hub
model_url = “Google | mobilenet_v2 | Kaggle”
feature_extract_layer=hub.KerasLayer(model_url,trainable=False,input_shape=(224,224,3),name=“feature_extraction”)
model=tf.keras.Sequential([
feature_extract_layer,
tf.keras.layers.Dense(train_data.num_classes,activation=‘softmax’,name=“outputLayer”)
])
model.summary()
the error is:
Only instances of keras.Layer
can be added to a Sequential model
knowing that it’s runing normaly in google colab