Closed ssinhaleite closed 11 months ago
In line #252 in todynapcnn.py, we call "find_chip_layer" to get the chip layer to monitor, however in this expression:
[self.find_chip_layer(lyr) for lyr in monitor_layers]
the variable "monitor_layers" might contains a string "dvs" in it, it will leads to an error, because in line #288 we are using the expression:
return self.chip_layers_ordering[layer_idx]
to obtain the members in a list, however the "layer_idx" might be a string: "dvs".
and the attribute "self.chip_layers_ordering" usually looks like:
print(self.chip_layers_ordering) >>> ['dvs', 0, 1, 2, 3, 4, 5, 6, 7]
An easy but inelegant solution is to replace:
monitor_chip_layers = [self.find_chip_layer(lyr) for lyr in monitor_layers]
with
monitor_chip_layers = [self.find_chip_layer(lyr) for lyr in monitor_layers if lyr != "dvs"]
in line #252.
but I think it might be better if we don't contain different types of data members in one list like:
self.chip_layers_ordering >>> ['dvs', 0, 1, 2, 3, 4, 5, 6, 7]
or the "chip_layers_ordering" and "monitor_layers" variables in the "make_config" method in line #184
Description
In line #252 in todynapcnn.py, we call "find_chip_layer" to get the chip layer to monitor, however in this expression:
the variable "monitor_layers" might contains a string "dvs" in it, it will leads to an error, because in line #288 we are using the expression:
to obtain the members in a list, however the "layer_idx" might be a string: "dvs".
and the attribute "self.chip_layers_ordering" usually looks like:
Solution
An easy but inelegant solution is to replace:
with
in line #252.
but I think it might be better if we don't contain different types of data members in one list like:
or the "chip_layers_ordering" and "monitor_layers" variables in the "make_config" method in line #184