Hi,
I am working with 4-dimensional tensors, and I am using for loop to check the conditional flow, I wanted to know how can I implement the below code efficiently
## object_temp Shape -> (24, 7, 7, 30)
## Object Shape -> (24, 7, 7)
## target Shape -> ( 24, 7, 7, 30)
for i in range(object.shape[0]):
for j in range(object.shape[1]):
for k in range(object.shape[2]):
if ((target[i,j,k,4] >0) | (target[i,j,k,9] >0)):
object[i,j,k] = 1
object_temp[i,j,k,:] = 1