AttributeError: module 'torch' has no attribute 'where

Hi.

I used this line in my main pytorch code:

torch.where(F.softmax(presence_vector.view(-1), dim=0) >= (1/len(m_vector))

I faced this error: AttributeError: module ‘torch’ has no attribute ‘where’.
'torch version is: ‘0.3.1’

Is there any help?
Thanks

Hi @solsol

torch.where was added in v0.4.0 Release Trade-off memory for compute, Windows support, 24 distributions with cdf, variance etc., dtypes, zero-dimensional Tensors, Tensor-Variable merge, , faster distributed, perf and bug fixes, CuDNN 7.1 · pytorch/pytorch · GitHub