Content of tuple

any one can help how i can check the content of tuple tensor
when we print its shape or size its says
" Tuple object has no attribute shape "
" Tuple object has no attribute size"
although with len function we can check the length but its not showing any detail about the exact content of the tuple
for example i am printing the length of tuple named “sample”

print(" sample len",len(sample))

its shows the length which is two and has one element on its 2nd dimension but no idea about the shape of first dimension
shown as

tupple has no atrb size

any help regrading it

Hi saran,

Try this:

for i in sample:
 print(f'shape of sample[{i}]:', sample[i].shape)
1 Like