Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions example/auto_compression/image_classification/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ def eval():
model_filename=global_config["model_filename"],
params_filename=global_config["params_filename"])

features = None
for _var in val_program.list_vars():
print(f"meeting: {_var.name}")
if _var.name == "conv2d_98.tmp_1":
print(f"find {_var.name}")
features = _var

fetch_targets.append(features)
print('Loaded model from: {}'.format(global_config["model_dir"]))

val_loader = eval_reader(
Expand All @@ -90,8 +82,6 @@ def eval():
val_program,
feed={feed_target_names[0]: image},
fetch_list=fetch_targets)
features = np.array(pred[1])
print(f"feature shape: {features.shape}")

pred = np.array(pred[0])
label = np.array(label)
Expand Down