45 bool has_forwarded_ =
false;
y = f(x), elementwise, for one of the backend's activations. No parameters.
Definition activation_module.hpp:19
std::optional< DeviceType > compute_device() const override
The device this module computes on, so forward() can reject an input on another device before any ker...
Definition activation_module.hpp:33
void release_activations() override
Frees the tensors forward() kept for backward() and the relevance passes; containers release their ch...
ElementwiseOp op() const
Definition activation_module.hpp:34
Tensor forward_impl(const Tensor &input) override
The actual forward computation. Called by forward() after precondition checks.
OpType op_type() const override
This module's operation-category tag, for ComputationGraph node tagging.
Definition activation_module.hpp:32
bool supports_lrp_rule(LRPRule) const override
Whether propagate_relevance() implements rule (no silent fallback: callers such as ExplainerContext::...
Definition activation_module.hpp:31
ActivationModule(ElementwiseOp op, DeviceBackend *backend)
Tensor propagate_relevance(const Tensor &relevance_out, const LRPRuleConfig &config) override
relevance_out, unchanged.
Tensor backward(const Tensor &grad_output) override
grad_output times f'(x) at the cached input.
Vendor-agnostic compute/memory backend. CPUBackend, CUDABackend (Phase 1.5), and HIPBackend (Phase 1....
Definition device_backend.hpp:248
virtual DeviceType device() const noexcept=0
Which device this backend's buffers reside on.
Base class for every layer type (LinearModule, Conv2DModule, activations, ...).
Definition module.hpp:78
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) – th...
Definition tensor.hpp:29
Abstract base every layer subclasses – NVI forward(), pure-virtual LRP contract.
Definition acquisition_functions.hpp:16
OpType
The op-type tag a Node carries. Charter Part 2 §3: nodes are tagged by a small closed set of op types...
Definition op_type.hpp:19
LRPRule
The LRP rule family a module applies. Semantics follow Zennit 1.0.0 exactly (Anders et al....
Definition lrp_rule_config.hpp:21
ElementwiseOp
Unary elementwise operations supported by DeviceBackend::elementwise().
Definition device_backend.hpp:43
Configuration for LRP relevance propagation: which rule a module applies and its hyperparameters....
Definition lrp_rule_config.hpp:72