std1.0.0-beta-7 SafeC docs

std :: ml::gpu_cuda

Function std::cuda_relu_grad

#include <std/ml/gpu_cuda.h> source ยท definition

int cuda_relu_grad(struct CudaBuf z, struct CudaBuf g, struct CudaBuf out)

out = z > 0 ? g : 0. 'z' may be the ReLU input or its output (same sign test).