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
Longer:
I was recently going through the loading image dataset tutorial, and got the following error when applying the below code:
Code:
# num_parallel_calls are going to be autotuned
labeled_ds <- list_ds %>% dataset_map(preprocess_path, num_parallel_calls = tf$data$experimental$AUTOTUNE)
Error:
2022-04-09 12:16:47.207451: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at strided_slice_op.cc:108 : INVALID_ARGUMENT: slice index -1 of dimension 0 out of bounds.
Error in py_iter_next(it, completed) :
InvalidArgumentError: {{function_node __wrapped__IteratorGetNext_output_types_2_device_/job:localhost/replica:0/task:0/device:CPU:0}} slice index -1 of dimension 0 out of bounds.
[[{{node strided_slice}}]] [Op:IteratorGetNext]
After a bit of tinkering, I found that the get_label function was not splitting the directory path correctly. This resulted in the data_map function not being able to function correctly. This was because the file path containing the category was not being plit through tf$strings$split (split) and hence couldn't be compared through tf$equal(classes). Thus, the sep value of / was causing the error. Please see the TLDR section for the suggested fix.
The text was updated successfully, but these errors were encountered:
jonathannathanaus
changed the title
Problem in beginner tutorials
Problem & suggested fix in beginner tutorials - Loading Image Data
Apr 9, 2022
Hi Team,
TLDR:
Please check the change in instruction from "/" to "\\" :
Longer:
I was recently going through the loading image dataset tutorial, and got the following error when applying the below code:
Code:
Error:
After a bit of tinkering, I found that the
get_label
function was not splitting the directory path correctly. This resulted in thedata_map
function not being able to function correctly. This was because the file path containing the category was not being plit throughtf$strings$split
(split) and hence couldn't be compared throughtf$equal(classes)
. Thus, the sep value of/
was causing the error. Please see the TLDR section for the suggested fix.The text was updated successfully, but these errors were encountered: