spikingjelly.activation_based.spike_op package#

spikingjelly.activation_based.cuda_kernel.spike_op.spike_linear(spike: Tensor, weight: Tensor, bias: Tensor | None = None) Tensor[源代码]#

API Language: 中文 | English


  • 中文

torch.nn.functional.linear 在输入为脉冲时的特例。

备注

在CUDA设备上训练时拥有比 torch.nn.functional.linear 更低的显存消耗。

警告

spike 中的任何元素都必须为0或1。


  • English

A specific case of torch.nn.functional.linear with inputs are spikes.

Note

This function has less memory consumption than torch.nn.functional.linear when training on CUDA devices.

Warning

Any element in spike must be 0 or 1.

spikingjelly.activation_based.cuda_kernel.spike_op.spike_conv1d(spike: Tensor, weight: Tensor, bias: Tensor = None, stride: int | Size | list[int] | tuple[int, ...] = 1, padding: str = 'valid', dilation: int | Size | list[int] | tuple[int, ...] = 1, groups: int = 1) Tensor[源代码]#

API Language: 中文 | English


  • 中文

torch.nn.functional.conv1d 在输入为脉冲时的特例。

备注

在CUDA设备上训练时拥有比 torch.nn.functional.conv1d 更低的显存消耗。

警告

spike 中的任何元素都必须为0或1。


  • English

A specific case of torch.nn.functional.conv1d with inputs are spikes.

Note

This function has less memory consumption than torch.nn.functional.conv1d when training on CUDA devices.

Warning

Any element in spike must be 0 or 1.

spikingjelly.activation_based.cuda_kernel.spike_op.spike_conv2d(spike: Tensor, weight: Tensor, bias: Tensor | None = None, stride: int | Size | list[int] | tuple[int, ...] = 1, padding: str = 'valid', dilation: int | Size | list[int] | tuple[int, ...] = 1, groups: int = 1) Tensor[源代码]#

API Language: 中文 | English


  • 中文

torch.nn.functional.conv2d 在输入为脉冲时的特例。

备注

在CUDA设备上训练时拥有比 torch.nn.functional.conv2d 更低的显存消耗。

警告

spike 中的任何元素都必须为0或1。


  • English

A specific case of torch.nn.functional.conv2d with inputs are spikes.

Note

This function has less memory consumption than torch.nn.functional.conv2d when training on CUDA devices.

Warning

Any element in spike must be 0 or 1.

spikingjelly.activation_based.cuda_kernel.spike_op.spike_conv3d(spike: Tensor, weight: Tensor, bias: Tensor | None = None, stride: int | Size | list[int] | tuple[int, ...] = 1, padding: str = 'valid', dilation: int | Size | list[int] | tuple[int, ...] = 1, groups: int = 1) Tensor[源代码]#

API Language: 中文 | English


  • 中文

torch.nn.functional.conv3d 在输入为脉冲时的特例。

备注

在CUDA设备上训练时拥有比 torch.nn.functional.conv3d 更低的显存消耗。

警告

spike 中的任何元素都必须为0或1。


  • English

A specific case of torch.nn.functional.conv3d with inputs are spikes.

Note

This function has less memory consumption than torch.nn.functional.conv3d when training on CUDA devices.

Warning

Any element in spike must be 0 or 1.

class spikingjelly.activation_based.cuda_kernel.spike_op.SpikeLinear(in_features: int, out_features: int, bias: bool = True, device=None, dtype=None)[源代码]#

基类:Linear

API Language: 中文 | English


  • 中文

  • 中文

torch.nn.Linear 在输入为脉冲时的特例。

备注

在CUDA设备上运行时拥有比 torch.nn.Linear 更低的显存消耗。

警告

spike 中的任何元素都必须为0或1。


  • English

  • English

A specific case of torch.nn.Linear with inputs are spikes.

Note

This function has less memory consumption than torch.nn.Linear when training on CUDA devices.

Warning

Any element in spike must be 0 or 1.

forward(spike: Tensor) Tensor[源代码]#
class spikingjelly.activation_based.cuda_kernel.spike_op.SpikeConv1d(in_channels: int, out_channels: int, kernel_size: int | tuple[int], stride: int | tuple[int] = 1, padding: str | int | tuple[int] = 0, dilation: int | tuple[int] = 1, groups: int = 1, bias: bool = True, padding_mode: str = 'zeros', device=None, dtype=None)[源代码]#

基类:Conv1d

API Language: 中文 | English


  • 中文

  • 中文

torch.nn.Conv1d 在输入为脉冲时的特例。

备注

在CUDA设备上运行时拥有比 torch.nn.Conv1d 更低的显存消耗。

警告

spike 中的任何元素都必须为0或1。


  • English

  • English

A specific case of torch.nn.Conv1d with inputs are spikes.

Note

This function has less memory consumption than torch.nn.Conv1d when training on CUDA devices.

Warning

Any element in spike must be 0 or 1.

class spikingjelly.activation_based.cuda_kernel.spike_op.SpikeConv2d(in_channels: int, out_channels: int, kernel_size: int | tuple[int, int], stride: int | tuple[int, int] = 1, padding: str | int | tuple[int, int] = 0, dilation: int | tuple[int, int] = 1, groups: int = 1, bias: bool = True, padding_mode: str = 'zeros', device=None, dtype=None)[源代码]#

基类:Conv2d

API Language: 中文 | English


  • 中文

  • 中文

torch.nn.Conv2d 在输入为脉冲时的特例。

备注

在CUDA设备上运行时拥有比 torch.nn.Conv2d 更低的显存消耗。

警告

spike 中的任何元素都必须为0或1。


  • English

  • English

A specific case of torch.nn.Conv2d with inputs are spikes.

Note

This function has less memory consumption than torch.nn.Conv2d when training on CUDA devices.

Warning

Any element in spike must be 0 or 1.

class spikingjelly.activation_based.cuda_kernel.spike_op.SpikeConv3d(in_channels: int, out_channels: int, kernel_size: int | tuple[int, int, int], stride: int | tuple[int, int, int] = 1, padding: str | int | tuple[int, int, int] = 0, dilation: int | tuple[int, int, int] = 1, groups: int = 1, bias: bool = True, padding_mode: str = 'zeros', device=None, dtype=None)[源代码]#

基类:Conv3d

API Language: 中文 | English


  • 中文

  • 中文

torch.nn.Conv3d 在输入为脉冲时的特例。

备注

在CUDA设备上运行时拥有比 torch.nn.Conv3d 更低的显存消耗。

警告

spike 中的任何元素都必须为0或1。


  • English

  • English

A specific case of torch.nn.Conv3d with inputs are spikes.

Note

This function has less memory consumption than torch.nn.Conv3d when training on CUDA devices.

Warning

Any element in spike must be 0 or 1.