QLeakyRelu Class — pytorch Architecture
Architecture documentation for the QLeakyRelu class in qrelu.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/quantized/cpu/qrelu.cpp lines 202–218
class QLeakyRelu final {
public:
static Tensor run(Tensor self, const Scalar& negative_slope, bool inplace, double output_scale, int64_t output_zero_point) {
// inplace argument is ignored now, TODO:support inplace
if (inplace) {
TORCH_WARN("inplace=True is not supported for quantized::leaky_relu yet");
}
const auto qx = self.contiguous(self.suggest_memory_format());
auto qy = at::_empty_affine_quantized(qx.sizes(),
at::device(kCPU).dtype(self.scalar_type()),
output_scale,
output_zero_point,
self.suggest_memory_format());
qrelu_leaky_stub(self.device().type(), qy, qx, negative_slope);
return qy;
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free