Is there function in pytorch similar to tf.contrib.distributions.percentile of tensorflow?
Is there a function in PyTorch that does the same as tf.contrib.distributions.percentile of Tensorflow?

Interestingly, it seems PyTorch is not providing any operator on its own for this, at least not according to its search function.
Fortunately, though, PyTorch Tensors can easily be used with NumPy functions, so that you can simply call numpy.percentile, see the example below:

import torch as t
import numpy as np

x = t.Tensor([1,2,3])
print(np.percentile(x, 30)) # 30-th percentile of x
# 1.6

