src/lstm/tfnetwork.cpp
bool TFNetwork::DeSerialize(TFile *fp) {
  std::vector<char> data;
  if (!fp->DeSerialize(data))
    return false;
  if (!model_proto_.ParseFromArray(&data[0], data.size())) {
    return false;
  }
  return InitFromProto();
}
// Reads from the given file. Returns false in case of error.
// Should be overridden by subclasses, but NOT called by their DeSerialize.
Reads from the given file. Returns false in case of error.
Should be overridden by subclasses, but NOT called by their DeSerialize.
Reads from the given file . Returns false in case of error . Should be overridden by subclasses but NOT called by their DeSerialize .
bool TFNetwork::DeSerialize(TFile *fp) {
  std::vector<char> data;
  if (!fp->DeSerialize(data))
    return false;
  if (!model_proto_.ParseFromArray(&data[0], data.size())) {
    return false;
  }
  return InitFromProto();
}
bool TFNetwork :: DeSerialize ( TFile * fp ) { std :: vector < char > data ; if ( ! fp -> DeSerialize ( data ) ) return false ; if ( ! model_proto_ . ParseFromArray ( & data [ 0 ] , data . size ( ) ) ) { return false ; } return InitFromProto ( ) ; }
Reads from the given file.
Reads from the given file .