You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not very original, I just took the implementation of softmax and added the line layer = ctx.network.add_unary(input=layer.get_output(0), op=trt.UnaryOperation.LOG) which is what log softmax is supposed to do. Well, tests fail
Interestingly enough one tests passes, other five fail. What I'm worried about is that the errors are quite large. At first I thought maybe using some more clever formula like logsoftmax(x) = (x - x_max) - log(sum(exp((x - x_max)))) would perform better here, I tried my luck implementing it, but to no avail, still one test passes, the rest fails. But even in the current implementation I wouldn't expect such extreme errors, this tells me that something is wrong on a fundamental level. I would appreciate any help @jaybdub
I will gladly create a PR if you help me get it working
The text was updated successfully, but these errors were encountered:
Hi, I want to convert
torch.nn.functional.log_softmax
to trt, however, some of my tests seem to fail and I don't know why.This is what I came up with:
This is not very original, I just took the implementation of
softmax
and added the linelayer = ctx.network.add_unary(input=layer.get_output(0), op=trt.UnaryOperation.LOG)
which is what log softmax is supposed to do. Well, tests failInterestingly enough one tests passes, other five fail. What I'm worried about is that the errors are quite large. At first I thought maybe using some more clever formula like
logsoftmax(x) = (x - x_max) - log(sum(exp((x - x_max))))
would perform better here, I tried my luck implementing it, but to no avail, still one test passes, the rest fails. But even in the current implementation I wouldn't expect such extreme errors, this tells me that something is wrong on a fundamental level. I would appreciate any help @jaybdubI will gladly create a PR if you help me get it working
The text was updated successfully, but these errors were encountered: