@@ -32,7 +32,7 @@ namespace tesseract {
32
32
33
33
TFNetwork::TFNetwork (const STRING& name) : Network(NT_TENSORFLOW, name, 0 , 0 ) {}
34
34
35
- int TFNetwork::InitFromProtoStr (const string& proto_str) {
35
+ int TFNetwork::InitFromProtoStr (const std:: string& proto_str) {
36
36
if (!model_proto_.ParseFromString (proto_str)) return 0 ;
37
37
return InitFromProto ();
38
38
}
@@ -41,7 +41,7 @@ int TFNetwork::InitFromProtoStr(const string& proto_str) {
41
41
// Should be overridden by subclasses, but called by their Serialize.
42
42
bool TFNetwork::Serialize (TFile* fp) const {
43
43
if (!Network::Serialize (fp)) return false ;
44
- string proto_str;
44
+ std:: string proto_str;
45
45
model_proto_.SerializeToString (&proto_str);
46
46
GenericVector<char > data;
47
47
data.resize_no_init (proto_str.size ());
@@ -66,7 +66,7 @@ bool TFNetwork::DeSerialize(TFile* fp) {
66
66
void TFNetwork::Forward (bool debug, const NetworkIO& input,
67
67
const TransposedArray* input_transpose,
68
68
NetworkScratch* scratch, NetworkIO* output) {
69
- std::vector<std::pair<string, Tensor>> tf_inputs;
69
+ std::vector<std::pair<std:: string, Tensor>> tf_inputs;
70
70
int depth = input_shape_.depth ();
71
71
ASSERT_HOST (depth == input.NumFeatures ());
72
72
// TODO(rays) Allow batching. For now batch_size = 1.
@@ -101,7 +101,7 @@ void TFNetwork::Forward(bool debug, const NetworkIO& input,
101
101
*eigen_htensor.data () = stride_map.Size (FD_HEIGHT);
102
102
tf_inputs.emplace_back (model_proto_.image_heights (), height_tensor);
103
103
}
104
- std::vector<string> target_layers = {model_proto_.output_layer ()};
104
+ std::vector<std:: string> target_layers = {model_proto_.output_layer ()};
105
105
std::vector<Tensor> outputs;
106
106
Status s = session_->Run (tf_inputs, target_layers, {}, &outputs);
107
107
if (!s.ok ()) tprintf (" session->Run failed:%s\n " , s.error_message ().c_str ());
0 commit comments