“numerical expression has 2 elements: only the first used”

I am trying to loop over 4D tensor data with shape 6,28,28,3

for (im in 1:train_images[,,,]) {

print(im)

}

Warning message in 1:train_images[, , , ]:
“numerical expression has 2 elements: only the first used”

Error in 1:train_images[, , , ]: NA/NaN argument
Traceback:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.