spikingjelly package
Subpackages
- spikingjelly.activation_based package
- Subpackages
- spikingjelly.activation_based.ann2snn package
- spikingjelly.activation_based.examples package
- Subpackages
- Submodules
- spikingjelly.activation_based.examples.A2C module
- spikingjelly.activation_based.examples.DQN_state module
- spikingjelly.activation_based.examples.PPO module
- spikingjelly.activation_based.examples.Spiking_A2C module
- spikingjelly.activation_based.examples.Spiking_DQN_state module
- spikingjelly.activation_based.examples.Spiking_PPO module
- spikingjelly.activation_based.examples.cifar10_r11_enabling_spikebased_backpropagation module
- spikingjelly.activation_based.examples.classify_dvsg module
- spikingjelly.activation_based.examples.conv_fashion_mnist module
- spikingjelly.activation_based.examples.dqn_cart_pole module
- spikingjelly.activation_based.examples.lif_fc_mnist module
- spikingjelly.activation_based.examples.rsnn_sequential_fmnist module
- spikingjelly.activation_based.examples.speechcommands module
- spikingjelly.activation_based.examples.spiking_lstm_sequential_mnist module
- spikingjelly.activation_based.examples.spiking_lstm_text module
- Module contents
- spikingjelly.activation_based.model package
- Submodules
- spikingjelly.activation_based.model.parametric_lif_net module
- spikingjelly.activation_based.model.sew_resnet module
- spikingjelly.activation_based.model.spiking_resnet module
- spikingjelly.activation_based.model.spiking_vgg module
- spikingjelly.activation_based.model.train_classify module
- spikingjelly.activation_based.model.train_imagenet module
- Module contents
- Module contents
- Subpackages
- spikingjelly.datasets package
- Submodules
- spikingjelly.datasets.asl_dvs module
- spikingjelly.datasets.cifar10_dvs module
- spikingjelly.datasets.dvs128_gesture module
- spikingjelly.datasets.es_imagenet module
- spikingjelly.datasets.n_caltech101 module
- spikingjelly.datasets.n_mnist module
- spikingjelly.datasets.nav_gesture module
- spikingjelly.datasets.shd module
cal_fixed_frames_number_segment_index_shd()
integrate_events_segment_to_frame_shd()
integrate_events_by_fixed_frames_number_shd()
integrate_events_file_to_frames_file_by_fixed_frames_number_shd()
integrate_events_by_fixed_duration_shd()
integrate_events_file_to_frames_file_by_fixed_duration_shd()
custom_integrate_function_example()
SpikingHeidelbergDigits
SpikingSpeechCommands
- spikingjelly.datasets.speechcommands module
- Module contents
play_frame()
load_aedat_v3()
load_ATIS_bin()
load_npz_frames()
integrate_events_segment_to_frame()
cal_fixed_frames_number_segment_index()
integrate_events_by_fixed_frames_number()
integrate_events_file_to_frames_file_by_fixed_frames_number()
integrate_events_by_fixed_duration()
integrate_events_file_to_frames_file_by_fixed_duration()
save_frames_to_npz_and_print()
create_same_directory_structure()
split_to_train_test_set()
pad_sequence_collate()
padded_sequence_mask()
NeuromorphicDatasetFolder
NeuromorphicDatasetFolder.set_root_when_train_is_none()
NeuromorphicDatasetFolder.resource_url_md5()
NeuromorphicDatasetFolder.downloadable()
NeuromorphicDatasetFolder.extract_downloaded_files()
NeuromorphicDatasetFolder.create_events_np_files()
NeuromorphicDatasetFolder.get_H_W()
NeuromorphicDatasetFolder.load_events_np()
random_temporal_delete()
RandomTemporalDelete
create_sub_dataset()
- spikingjelly.timing_based package
- spikingjelly.visualizing package
Submodules
spikingjelly.configure module
This py file defines some variables used in SpikingJelly. Here is an example of how you can change them to make effect in your codes:
import spikingjelly spikingjelly.configure.cuda_threads = 512
Do not change them in this way, which will not make effect:
from spikingjelly.configure import cuda_threads cuda_threads = 512
- spikingjelly.configure.max_threads_number_for_datasets_preprocess = 16
max_threads_number_for_datasets_preprocess defines the maximum threads for datasets preprocessing, which is 1. reading binary events and saving them to numpy format 2. integrating events to frames.
Note that a too larger max_threads_number_for_datasets_preprocess will overload the disc and slow down the speed.
- spikingjelly.configure.cuda_threads = 512
cuda_threads defines the default threads number for CUDA kernel.
It is recommended that cuda_threads is the power of 2.
- spikingjelly.configure.cuda_compiler_options = ('-use_fast_math',)
cuda_compiler_options defines the compiler options passed to the backend (NVRTC or NVCC).
For more details, refer to 1. https://docs.nvidia.com/cuda/nvrtc/index.html#group__options 2. https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#command-option-description 3. https://github.com/fangwei123456/spikingjelly/discussions/116
- spikingjelly.configure.cuda_compiler_backend = 'nvrtc'
cuda_compiler_backend defines the compiler for CUDA(cupy).
It can be set to ‘nvcc’ or ‘nvrtc’.
- spikingjelly.configure.save_datasets_compressed = True
If save_datasets_compressed == True, events and frames in spikingjelly.datasets will be saved in compressed npz format.
The compressed npz file consumes less memory in disk but more time in reading.
- spikingjelly.configure.save_spike_as_bool_in_neuron_kernel = False
If save_spike_as_bool_in_neuron_kernel == True, the neuron kernel used in the neuron’s cupy backend will save the spike as a bool, rather than float/half tensor for backward, which can reduce the memory consumption.
- spikingjelly.configure.save_bool_spike_level = 0
save_bool_spike_level take effects on SpikeConv/SpikeLinear, and on neuron’s cupy kernel when save_spike_as_bool_in_cuda_utils == True.
If save_bool_spike_level == 0, spikes will be saved in bool. Note that bool uses 8-bit, rather than 1-bit.
If save_bool_spike_level == 1, spikes will be saved in uint8 with each 8-bit storing 8 spikes.
A larger save_bool_spike_level means less memory consumption but slower speed.