- class td3a_cpp_deep.fcts.piecewise_linear.PiecewiseLinearFunction(*args, **kwargs)¶
Implements a function similar to a piecewise linear function. It multiplies by different coefficient on negative and positive number. It takes a tensor of shape (N, 1).
- class td3a_cpp_deep.fcts.piecewise_linear.PiecewiseLinearFunctionC(*args, **kwargs)¶
Same function as
PiecewiseLinearFunctionbut the implementation of forward and backward functions are done in C. See
piecewise_linear_backward. It follows the tutorial Custom C++ and Cuda Extensions.