DeepLearning101's picture
Upload 25 files
6e66a6e
raw
history blame
179 Bytes
import torch
"""
Transform the torch logits into probabilities.
"""
def softmax(logits):
probs = torch.softmax(torch.from_numpy(logits).float(), -1).numpy()
return probs