CUDNN_ACTIVATION_IMPL_MIXIN

version(grain_cuda)
enum CUDNN_ACTIVATION_IMPL_MIXIN = q{ // TODO support inplace Variable!(T, dim, DeviceStorage) dx, dy; /// auto forward(Variable!(T, dim, DeviceStorage) x) { // FIXME if train this.dx = x.dup; auto y = x.uninit; activationForward!mode(x, y); this.dy = y; return y; } /// auto backward(Variable!(T, dim, DeviceStorage) gy) { auto gx = gy.uninit; activationBackward!mode(gx, gy, this.dx, this.dy); return gx; } };

Meta