Open EdwinB12 opened 1 year ago
Just had a look at this, the fix suggested by the error message works. But if you want to access the predicted classes as an array of integers (which the following cells suggest you do), then you'll want to add as.integer() as the final step in the pipe.
Happy to fix it, just want to make sure this is what you want it to do
Yes fairly sure that is the desired behaviour @ubdbra001.
Also need to update this text:
This prediction approach can be useful if you want to know the probability distribution for each prediction across all classes. However, if you are only interested in the predicted class, there is a shorthand keras function that can return predicted classes instead,
predict_classes
.
The code following it will be:
preds_classes <- model %>% predict(x = pred_images) %>% k_argmax() %>% as.integer()
gives a depreciated call error.
Reported by a course participant and reproduced. Full traceback below: