python - AttributeError: 'Sequential' object has no attribute ...
stackoverflow.com › questions › 68883510Aug 22, 2021 · Whenever I try run this code, it displays: AttributeError: 'Sequential' object has no attribute 'predict_classes'. The first line returns the error: result = str (model.predict_classes (roi, 1, verbose = 0) [0]) cv2.putText (copy, getLetter (result), (300 , 100), cv2.FONT_HERSHEY_COMPLEX, 2, (0, 255, 0), 2) cv2.imshow ('frame', copy) python opencv machine-learning.
The Sequential model - Keras
keras.io › guides › sequential_modelApr 12, 2020 · Creating a Sequential model. You can create a Sequential model by passing a list of layers to the Sequential constructor: model = keras.Sequential( [ layers.Dense(2, activation="relu"), layers.Dense(3, activation="relu"), layers.Dense(4), ] ) Its layers are accessible via the layers attribute: model.layers.