Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions nn_meter/predictor/prediction/extract_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,17 @@ def get_predict_features(config):
elif "concat" in op: # maximum 4 branches
itensors = item["input_tensors"]
inputh = itensors[0][1]
features = [inputh, len(itensors)]
#features = [inputh, len(itensors)]
features = [inputh]
for it in itensors:
co = it[-1]
co = it[-2]
features.append(co)
if len(features) < 6:
features = features + [0] * (6 - len(features))
elif len(features) > 6:
nf = features[0:6]
if len(features) < 5:
features = features + [0] * (5 - len(features))
elif len(features) > 5:
nf = features[0:5]
features = nf
features[1] = 6
#features[1] = 5
elif op in ["hswish"]:
if "inputh" in item:
inputh = item["inputh"]
Expand Down