fn
leaky_mask_storage
→Storageint leaky_mask_storage(const int & s, double slope, int numel, Dtype dt, Device device)LeakyReLU gradient mask: returns 1 where s >= 0 else slope.
Parameters
sconst Storage&Input buffer (LeakyReLU's saved input).
slopedoubleNegative-side slope; the LeakyReLU's
negative_slope parameter.numelstd::size_tNumber of elements.
dtDtypeOutput dtype.
deviceDeviceTarget device.
Returns
StorageNew storage suitable for element-wise multiplication into grad_output.