pytorch / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration
https://pytorch.org
Other
81.53k stars 21.88k forks source link

[docs] torch.log_softmax is undocumented #60520

Open kshitij12345 opened 3 years ago

kshitij12345 commented 3 years ago
>>> import torch
>>> t = torch.ones(2, 2)
>>> torch.log_softmax(t, 0)
tensor([[-0.6931, -0.6931],
        [-0.6931, -0.6931]])
>>> help(torch.log_softmax)

image

cc: @mruberry

cc @brianjo @mruberry

mruberry commented 3 years ago

Is that because we only try to expose it as torch.nn.functional.log_softmax?

https://pytorch.org/docs/master/generated/torch.nn.functional.log_softmax.html?highlight=log_softmax#torch.nn.functional.log_softmax

kshitij12345 commented 3 years ago

Is that because we only try to expose it as torch.nn.functional.log_softmax?

In that case shouldn't it be _log_softmax?

mruberry commented 3 years ago

You mean: shouldn't we hide the name in the torch namespace? Yes. But we should treat a change like that as BC-breaking.