TypeError: expected np.ndarray (got Tensor)

getting an error while converting the NumPy array to tensor…

to solve this issue we need to mention the

dtype=np.float32

not this

dtype=‘float32’

while we are forming the NumPy array