neurosim / DNN_NeuroSim_V1.3

Benchmark framework of compute-in-memory based accelerators for deep neural network (inference engine focused)
62 stars 36 forks source link

argument --wl_weight handled as "str" type #30

Closed DavidSe7enLynch closed 2 years ago

DavidSe7enLynch commented 2 years ago

These arguments were treated as "str" type (the default value is "int" type, so no problem if not manually set their values like "--wl_weight 4"). By adding a type conversion in quantization_cpu_np_infer.py like this, the bug could be fixed.

self.wl_weight = int(wl_weight) self.wl_activate = int(wl_activate) self.wl_error = int(wl_error) self.wl_input = int(wl_input)

neurosim commented 2 years ago

Thanks for your suggestion. We specify the type in the argparse to avoid this bug now.