0

I'm trying to train a prediction model using EfficientnetB4 and coming across this error:

AttributeError                            Traceback (most recent call last)
<ipython-input-16-5066d78634f9> in <module>()
----> 1 X_train, X_val, X_test, y_train, y_val, y_test = get_features(model, train_it, validate_it)

<ipython-input-10-437f64953231> in get_features(base_model, train, validate)
      1 def get_features(base_model, train, validate):
      2     X_train = base_model.predict(train)
----> 3     y_train = train.classes
      4 
      5     X_val = base_model.predict(validate)

AttributeError: 'BatchDataset' object has no attribute 'classes'

The BatchDataset seems to be an object within efficientnet.

Trong Van
  • 374
  • 1
  • 13

0 Answers0