Skip to content

predict_classes depricated from TensorFlow #1

Description

@MotivaoCrypto

Error in py_get_attr_impl(x, name, silent) :
AttributeError: 'Sequential' object has no attribute 'predict_classes'
In addition: Warning message:
In predict_classes(model, x_data_test) :
predict_classes() is deprecated and and was removed from tensorflow in version 2.6.
Please update your code:

  • If your model does multi-class classification:
    (e.g. if it uses a softmax last-layer activation).

    model %>% predict(x) %>% k_argmax()

  • if your model does binary classification
    (e.g. if it uses a sigmoid last-layer activation).

    model %>% predict(x) %>% >(0.5) %>% k_cast("int32")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions