spikingjelly.activation_based.spike_op package#

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

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.

参数:
返回类型:

Tensor

spikingjelly.activation_based.cuda_kernel.spike_op.spike_conv1d(spike, weight, bias=None, stride=1, padding='valid', dilation=1, groups=1)[源代码]#

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.

参数:
返回类型:

Tensor

spikingjelly.activation_based.cuda_kernel.spike_op.spike_conv2d(spike, weight, bias=None, stride=1, padding='valid', dilation=1, groups=1)[源代码]#

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.

参数:
返回类型:

Tensor

spikingjelly.activation_based.cuda_kernel.spike_op.spike_conv3d(spike, weight, bias=None, stride=1, padding='valid', dilation=1, groups=1)[源代码]#

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.

参数:
返回类型:

Tensor

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

基类:Linear

API Language - 中文 | English


  • 中文

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

备注

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

警告

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


  • 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.

参数:
  • in_features (int)

  • out_features (int)

  • bias (bool)

forward(spike)[源代码]#
参数:

spike (Tensor)

返回类型:

Tensor

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

基类:Conv1d

API Language - 中文 | English


  • 中文

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

备注

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

警告

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


  • 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, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)[源代码]#

基类:Conv2d

API Language - 中文 | English


  • 中文

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

备注

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

警告

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


  • 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, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)[源代码]#

基类:Conv3d

API Language - 中文 | English


  • 中文

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

备注

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

警告

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


  • 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.

参数: