How can I convert keras tensor to pytorch?

Please answer how keras tensor is converted into pytorch tensor?

If I’m not mistaken, Keras with TF as the backend (unsure if there are more supported backends anymore) uses numpy arrays as the input, so you could simply use tensor = torch.from_numpy(array).