You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
predicted_class_rec1_mlp <-
predict(tmod_rec1_mlp,
dfmat_rec1_matched,
force = TRUE)
I am having problems with the predict() portion. This is the error message I get, I think its a tensorflow issue. But I dont know how to correct my code. Pls help if you have time
Error in py_get_attr_impl(x, name, silent) :
AttributeError: 'Sequential' object has no attribute 'predict_classes'
Run reticulate::py_last_error() for details.
In addition: Warning message:
In predict_classes(object$seqfitted, x = data) : 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")
The text was updated successfully, but these errors were encountered:
Describe the bug
Its my first time reporting an issue. Please forgive me if I'm doing it iincorrectly.
Reproducible code
tmod_rec1_mlp <-
textmodel_mlp(x = dfmat_rec1_train,
y = dfmat_rec1_train$target,
epochs = 20,
metrics = "categorical_accuracy",
verbose = TRUE)
predicted_class_rec1_mlp <-
predict(tmod_rec1_mlp,
dfmat_rec1_matched,
force = TRUE)
I am having problems with the predict() portion. This is the error message I get, I think its a tensorflow issue. But I dont know how to correct my code. Pls help if you have time
Error in py_get_attr_impl(x, name, silent) :
AttributeError: 'Sequential' object has no attribute 'predict_classes'
Run
reticulate::py_last_error()
for details.In addition: Warning message:
In predict_classes(object$seqfitted, x = data) :
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")The text was updated successfully, but these errors were encountered: