alpha0422 / label-smoothing-cuda Goto Github PK
View Code? Open in Web Editor NEWHigh performance implementation of CUDA label smoothing with softmax cross entropy loss.
High performance implementation of CUDA label smoothing with softmax cross entropy loss.
Indeed, in my task, the output of the model is a tensor with the scale batch_size * 35 * 10(3 dim). The problem is that this repo is only 2 dim input supported. It is highly appreciated that adding the support to 3 dim tensors. Thanks for your great repo!
-> fert_loss=loss_func(fert_out, fert_label, args['fert_smooth'],\
(Pdb) loss_func(fert_out, fert_label, args['fert_smooth'],-1,False)
*** RuntimeError: input.dim() == 2 INTERNAL ASSERT FAILED at csrc/label_smoothing_cuda_kernel.cu:431, please report a bug to PyTorch. Currently only 2 dim input supported (host_softmax_xentropy at csrc/label_smoothing_cuda_kernel.cu:431)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x47 (0x7ffa59955627 in /home/wzh/anaconda3/envs/lbz37/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #1: std::vector<at::Tensor, std::allocator<at::Tensor> > host_softmax_xentropy<LogSoftMaxForwardEpilogue>(at::Tensor const&, at::Tensor const&, float, bool) + 0x503 (0x7ffa452459c2 in /home/wzh/anaconda3/envs/lbz37/lib/python3.7/site-packages/label_smoothing-0.1-py3.7-linux-x86_64.egg/label_smoothing_cuda.cpython-37m-x86_64-linux-gnu.so)
frame #2: softmax_xentropy_cuda(at::Tensor const&, at::Tensor const&, float, bool) + 0x50 (0x7ffa4523bff5 in /home/wzh/anaconda3/envs/lbz37/lib/python3.7/site-packages/label_smoothing-0.1-py3.7-linux-x86_64.egg/label_smoothing_cuda.cpython-37m-x86_64-linux-gnu.so)
frame #3: softmax_xentropy_forward(at::Tensor const&, at::Tensor const&, float, bool) + 0xa7 (0x7ffa4522d267 in /home/wzh/anaconda3/envs/lbz37/lib/python3.7/site-packages/label_smoothing-0.1-py3.7-linux-x86_64.egg/label_smoothing_cuda.cpython-37m-x86_64-linux-gnu.so)
frame #4: <unknown function> + 0x33d47 (0x7ffa45239d47 in /home/wzh/anaconda3/envs/lbz37/lib/python3.7/site-packages/label_smoothing-0.1-py3.7-linux-x86_64.egg/label_smoothing_cuda.cpython-37m-x86_64-linux-gnu.so)
frame #5: <unknown function> + 0x30f17 (0x7ffa45236f17 in /home/wzh/anaconda3/envs/lbz37/lib/python3.7/site-packages/label_smoothing-0.1-py3.7-linux-x86_64.egg/label_smoothing_cuda.cpython-37m-x86_64-linux-gnu.so)
<omitting python frames>
frame #11: THPFunction_apply(_object*, _object*) + 0xa0f (0x7ffa8fb35a3f in /home/wzh/anaconda3/envs/lbz37/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
frame #60: __libc_start_main + 0xe7 (0x7ffaebda9b97 in /lib/x86_64-linux-gnu/libc.so.6)
THC/THC.h: No such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.