We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
image_load
Hello:
library(keras3) img <- image_load("book_images/flamingo.jpg", target_size = c(224, 224))
How should I solve this problem? Thanks
'float' object cannot be interpreted as an integerTraceback: 1. do.call(keras$utils$load_img, args) 2. (structure(function (path, color_mode = "rgb", target_size = NULL, . interpolation = "nearest", keep_aspect_ratio = FALSE) . { . cl <- sys.call() . cl[[1L]] <- list2 . call_args <- split_named_unnamed(eval(cl, parent.frame())) . result <- py_call_impl(callable, call_args$unnamed, call_args$named) . if (py_get_convert(callable)) . result <- py_to_r(result) . if (is.null(result)) . invisible(result) . else result . }, class = c("python.builtin.function", "python.builtin.object" . ), py_object = <environment>))(path = "book_images/flamingo.jpg", . target_size = c(224, 224)) 3. py_call_impl(callable, call_args$unnamed, call_args$named) 4. stop(structure(list(message = "TypeError: 'float' object cannot be interpreted as an integer\nRun `reticulate::py_last_error()` for details.", . call = py_call_impl(callable, call_args$unnamed, call_args$named)), class = c("python.builtin.TypeError", . "python.builtin.Exception", "python.builtin.BaseException", "python.builtin.object", . "error", "condition"), py_object = <environment>))
The text was updated successfully, but these errors were encountered:
Thanks for the bug report, this will fixed shortly.
You can workaround for now by casting target_size to integer:
target_size
image_load(image_path, target_size = as.integer(c(224, 224))) # or image_load(image_path, target_size = shape(224, 224))
Sorry, something went wrong.
@t-kalinowski It works, Thanks a lot
image_load()
d75935f
Successfully merging a pull request may close this issue.
Hello:
How should I solve this problem? Thanks
The text was updated successfully, but these errors were encountered: