how can I convert tensor shape to numpy array?
Assuming that these are pytorch tensors, you can convert them to numpy arrays using the .numpy() method. Depending on whether your tensors are stored on the GPU or still attached to the graph you might have to add .cpu() and .detach().