Skip to content

Commit

Permalink
change test model file path
Browse files Browse the repository at this point in the history
  • Loading branch information
RayLiu2015 committed May 16, 2018
1 parent dd41e2c commit c9ffe85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
Expand Down Expand Up @@ -52,3 +51,6 @@ paddle-mobile.cbp

.idea


cmake-build-debug/

2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
exclude: 'third-party'

repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
sha: v1.0.1
Expand Down
4 changes: 2 additions & 2 deletions test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ int main() {

paddle_mobile::Loader<paddle_mobile::CPU> loader;
auto program = loader.Load(std::string(
"../test/models/image_classification_resnet.inference.model"));
"../../test/models/image_classification_resnet.inference.model"));

paddle_mobile::framework::Executor<paddle_mobile::CPU> executor(program);

paddle_mobile::framework::Tensor input;
SetupTensor<float>(&input, {1, 3, 32, 32}, static_cast<float>(0),
static_cast<float>(1));
float* input_ptr = input.data<float>();
float *input_ptr = input.data<float>();
for (int i = 0; i < input.numel(); ++i) {
// std::cout << input_ptr[i] << std::endl;
}
Expand Down

0 comments on commit c9ffe85

Please sign in to comment.