Skip to content
Snippets Groups Projects
Commit 991c3413 authored by ahoni's avatar ahoni
Browse files

run lib fix

parent e851459f
No related branches found
No related tags found
No related merge requests found
......@@ -181,6 +181,8 @@ class ModNEFModel(nn.Module):
output_spike, None
"""
print("hi")
def to_aer(input):
input = input.reshape(-1).to(torch.int32)
......@@ -197,7 +199,7 @@ class ModNEFModel(nn.Module):
batch_result = []
for sample in input_spikes:
sample_res = self.driver.run_sample(sample, to_aer, True, len(self.layers))
sample_res = self.driver.run_sample(sample, to_aer, True, 2) #TODO
batch_result.append([sample_res])
return torch.tensor(batch_result).permute(1, 0, 2), None
......
......@@ -202,7 +202,7 @@ def fpga_evaluation(model, testLoader, board_path, driver_config, name="FPGA Eva
return accuracy, y_pred, y_true
def confusion_matrix(y_true, y_pred, file_name, classes):
def conf_matrix(y_true, y_pred, file_name, classes):
cm = confusion_matrix(y_true, y_pred)
df_cm = pd.DataFrame(cm / np.sum(cm, axis=1)[:, None], index = [i for i in classes], columns = [i for i in classes])
plt.figure()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment