Closed felipefmoreira closed 5 years ago
Hi,
this would be better located in the keras
repo (https://github.com/rstudio/keras/), as it's not using tfdatasets
(just FYI, no problem).
The code will run with the following changes:
# R uses 1-based indexing
pred_image <- k_expand_dims(pred_image, axis = 1)
# use steps = 1 b/c 1 image
model %>% predict(pred_image, steps = 1)
That worked amazingly. Thank you so much.
Hello, I'm really new to this thing so the chances I'm asking something extremely dumb is huge. I'm working on converting a Python script I got on a online Deep Learning course to R and I'm having issues.
The script is to fit a classification model with images of dogs and cats (yeah, I'm that kind of newbie). The problem arises with the last part, where I try to read single photos on my PC so the model can predict whether it is a dog or a cat (I tried marking it bold, but I couldn't make it, lol).
The last 4 lines of code are the main trouble source. First, I tried predict_classes, but it retrieved the following error message:
I then tried to add the steps argument, but it didn't work either.