Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use json get_ref #181

Merged
merged 1 commit into from
May 22, 2020
Merged

Use json get_ref #181

merged 1 commit into from
May 22, 2020

Conversation

apivovarov
Copy link
Member

@apivovarov apivovarov commented May 22, 2020

Niels Lohmann recommends to use json.get_ref() instead of json.get() in case we use json object as a shared read-only storage of strings.

nlohmann/json#2130

Testing

model_peeker

# bin/model_peeker ../tests/python/integration/resnet18_v1
[07:40:46] /root/workplace/neo-ai-dlr/src/dlr_tvm.cc:68: Loading metadata file: ../tests/python/integration/resnet18_v1/resnet18.meta
backend is tvm
num_inputs = 1
num_weights = 62
num_outputs = 1
input_names: data,
input_types: float32,
output shapes:
[1, 1000, ]
output_names: softmax_tensor (index: 0),
output_types: float32,

run_resnet

# bin/run_resnet ../tests/python/integration/resnet18_v1 ~/workplace/models/dog_float32.npy
Loading model...
[07:41:08] /root/workplace/neo-ai-dlr/src/dlr_tvm.cc:68: Loading metadata file: ../tests/python/integration/resnet18_v1/resnet18.meta
Running inference...
Max probability is 0.994058 at index 151

@apivovarov apivovarov requested a review from trevor-m May 22, 2020 07:47
@apivovarov apivovarov merged commit 275b7ac into neo-ai:master May 22, 2020
@apivovarov apivovarov deleted the get_ref branch May 22, 2020 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants