Skip to content

Commit 85200d6

Browse files
committed
fix
1 parent 0e053d0 commit 85200d6

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,10 @@ sh predict.sh
9797
```
9898
If works right, you will see this
9999
```
100-
Load feature dict successfully
101-
sparse feature num: 34
102-
fieldid: 116 missid: 2
103-
fieldid: 6 missid: 9
104-
fieldid: 152 missid: 10
105-
fieldid: 9 missid: 3
106-
fieldid: 179 missid: 10
107-
fieldid: 179 feanum: 11
108-
fieldid: 116 feanum: 3
109-
fieldid: 6 feanum: 10
110-
fieldid: 152 feanum: 11
111-
fieldid: 9 feanum: 4
112100
Session created successfully
113101
Load graph protobuf successfully
114102
Add graph to session successfully
103+
Init lookup table successfully
115104
Run session successfully
116105
Tensor<type: float shape: [1,2] values: [0.85252136 0.14747864]>
117106
output value: 0.147479

src/deep_model.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ int main(int argc, char* argv[]) {
7272
std::vector<std::pair<std::string, Tensor> > fake_inputs;
7373
std::vector<tensorflow::Tensor> fake_outputs;
7474
status = session->Run(fake_inputs, {}, {"init_all_tables"}, &fake_outputs);
75+
if (!status.ok()) {
76+
std::cerr << status.ToString() << std::endl;
77+
return 1;
78+
} else {
79+
std::cout << "Init lookup table successfully" << std::endl;
80+
}
7581

7682
// Setup inputs and outputs
7783
// demo instance: "9:283:1 6:384:1 152:384:1"

0 commit comments

Comments
 (0)