A deep learning library for spiking neural networks which is based on PyTorch, focuses on fast training and supports inference on neuromorphic hardware.
When init a "DynapcnnCompatibleNetwork" instance, if you set the "dvs_input" arg to True, it will add an "DVSLayer" in the first place of the sequence.
Meanwhile, if you call the "make_config" method and pass a specific chip_layers_ordering list as its input argument, you must put a string "dvs" in the first place of this chip_layers_ordering list:
you will get an obscure "IndexError: list index out of range".
Solution
Add a condition expression to check whether "dvs" in the "chip_layers_ordering" list
if self.dvs_input and chip_layers_ordering[0] != "dvs":
raise Exception("self.dvs_input is True, but no \"dvs\" in chip_layers_ordering. Please add \"dvs\" into the chip_layers_ordering list.")
Description
When init a "DynapcnnCompatibleNetwork" instance, if you set the "dvs_input" arg to True, it will add an "DVSLayer" in the first place of the sequence.
Meanwhile, if you call the "make_config" method and pass a specific chip_layers_ordering list as its input argument, you must put a string "dvs" in the first place of this chip_layers_ordering list:
if you just pass a list only contains the numerical layer index in it like:
you will get an obscure "IndexError: list index out of range".
Solution
Add a condition expression to check whether "dvs" in the "chip_layers_ordering" list