Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有一个火炬 CUDA 张量,我想应用一些函数,sin()但我已经明确定义了函数F。如何使用并行计算F在 Pytorch 中应用。
sin()
F
我认为目前,不可能在 CUDA-Tensor 上显式并行化函数。一个可能的解决方案是,您可以定义一个函数,例如非线性激活函数。所以你可以通过网络和你的函数来反馈它。
缺点是,它可能不起作用,因为您必须定义一个 CUDA-Function 并且必须重新编译 pytorch。