S.F
(S.F)
December 13, 2017, 12:52am
1
Hi, all,
when I tried to implement:
m = nn.Hardshrink()
input = Variable(torch.randn(2)).cuda()
print(m(input))
It showed hard shrink_forward is not implemented for type torch.cuda.FloatTensor.
However, when I tried Softshrink, it worked. Does this mean this function doesn’t support cuda?
Thanks in advance!
richard
December 13, 2017, 5:00pm
2
That’s correct, there’s currently no CUDA version of HardShrink.
S.F
(S.F)
December 13, 2017, 6:42pm
3
Are we planning to have that? It seems strange that softshrink has while hardshrink doesnot.
richard
December 13, 2017, 6:48pm
4
It’s probably a good thing to have. I’ve opened a feature request for it here .
S.F
(S.F)
December 13, 2017, 9:39pm
5
Thanks. Hope this will be resolved soon.
esl
May 11, 2018, 9:00am
6
hi all, almost half year passed, is any solution here for this problem?
The issue is still open, so not yet.
wwj
June 21, 2018, 9:08pm
8
I am also using HardShrink function and trying to put my model on cuda. Is there a projected time for when that will be fixed?
Thanks!
SimonW
(Simon Wang)
June 21, 2018, 9:37pm
9
It’s now implemented on GitHub master by @Wei_Yang !