hxtorch.perceptron.nn
This module contains layers that can be used in modules together with the building blocks from py:mod:torch.nn. Unlike their counterparts, their multiply-accumulate operations are performed with the BrainScaleS-2 accelerator. Additional digital operations are performed in the SIMD processors of BSS-2.
Classes
|
Applies a 1D convolution over an input signal composed of several input planes. |
|
Applies a 2D convolution over an input image composed of several input planes. |
|
Base class for n-dimensional convolution. |
|
Applies a rectified linear unit to the input, shifts and clips to the input range of the chip. |
|
Unrolls the weight matrix for execution on hardware. |
|
Integral adds a conversion to int and the bit-string operations. |
|
Base class of all layers in |
|
Applies a linear transformation to the incoming data on Hicann-X. |
|
Layer that performs a multiply accumulate operation. |
|
Applies a rectified linear unit to the input. |
|
To Complex, Real adds the operations that work on real numbers. |
Functions
-
hxtorch.perceptron.nn.
abstractmethod
(funcobj) A decorator indicating abstract methods.
Requires that the metaclass is ABCMeta or derived from it. A class that has a metaclass derived from ABCMeta cannot be instantiated unless all of its abstract methods are overridden. The abstract methods can be called using any of the normal ‘super’ call mechanisms. abstractmethod() may be used to declare abstract methods for properties and descriptors.
Usage:
- class C(metaclass=ABCMeta):
@abstractmethod def my_abstract_method(self, …):
…
-
hxtorch.perceptron.nn.
clamp_weight_
(weight: torch.Tensor) → torch.Tensor Clamps all elements of the weight in-place into the maximal weight range of BrainScaleS-2.
-
hxtorch.perceptron.nn.
scale_input
(x_in: torch.Tensor) → torch.Tensor Scales the tensor to the maximal input range of BrainScaleS-2.
-
hxtorch.perceptron.nn.
scale_weight
(weight: torch.Tensor) → torch.Tensor Scales the tensor to the maximal weight range of BrainScaleS-2.
-
hxtorch.perceptron.nn.
signature
(obj, *, follow_wrapped=True) Get a signature object for the passed callable.