I have taken code from a GitHub repository for quantization and pruning in a Federated Learning (FL) environment. However, I am facing a "list index out of range" error in one of the pruning files. Even if I try to resolve it by adding a if(condition), it still gives me the "index out of range" error means it execute only else part every time.so I am confused why it again & again execute else part only. I want to validate this else part execution is correct or not.
I would be very grateful if someone could guide me on how to resolve this error.
code
error message
if i put (if condition) it only execute else part only every time.
if index < len(load_scale) and index < len(load_zero_point):
# test_para = Quan.dequantize_tensor(load_scale[index], tensor_load_numpy, load_zero_point[index])
# print ("working")
# model.state_dict()[var_name].copy_(test_para)
# else:
# print("index out of range{index}")
# break
Hello,
I have taken code from a GitHub repository for quantization and pruning in a Federated Learning (FL) environment. However, I am facing a "list index out of range" error in one of the pruning files. Even if I try to resolve it by adding a if(condition), it still gives me the "index out of range" error means it execute only else part every time.so I am confused why it again & again execute else part only. I want to validate this else part execution is correct or not. I would be very grateful if someone could guide me on how to resolve this error.
code
error message
if i put (if condition) it only execute else part only every time.
if index < len(load_scale) and index < len(load_zero_point):