Skip to content
Snippets Groups Projects
Commit 3b278776 authored by auphelia's avatar auphelia
Browse files

[Code Generation] Pre-commit formatted files

parent d96d56d5
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ def strm_prgm(model, code_gen_dict):
def computation_cmds(all_strmfcl, code_gen_dict):
code_gen_dict["compute"] = []
for i in range(len(all_strmfcl)):
if i == (len(all_strmfcl)-1):
if i == (len(all_strmfcl) - 1):
code_gen_dict["compute"].append(
"{}<L{}_MW, L{}_MH, L{}_SIMD, L{}_PE, {}> "
"({}, {}, {}, {}, numReps, {});".format(
......@@ -84,7 +84,7 @@ def computation_cmds(all_strmfcl, code_gen_dict):
i,
all_strmfcl[i].resDataType,
all_strmfcl[i].input,
all_strmfcl[i+1].input,
all_strmfcl[i + 1].input,
all_strmfcl[i].weights,
all_strmfcl[i].thresholds,
all_strmfcl[i].resType,
......@@ -92,7 +92,6 @@ def computation_cmds(all_strmfcl, code_gen_dict):
)
def config_cmds(model, code_gen_dict):
all_strmfcl = []
code_gen_dict["config"] = []
......@@ -143,6 +142,7 @@ def config_cmds(model, code_gen_dict):
all_strmfcl.append(layer)
return all_strmfcl
def code_generation(model):
code_gen_dict = {}
......
class StreamingFCLayer_Batch:
def __init__(self, node, model):
self.op_type = 'StreamingFCLayer_Batch'
self.op_type = "StreamingFCLayer_Batch"
# Layer attributes
num_attr = len(node.attribute)
for k in range(num_attr):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment