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 https://github.com/pytorch/pytorch/releases/tag/v0.4.0