fix som solaris

This commit is contained in:
tqchen
2014-09-02 00:12:15 -07:00
parent bb5c151f57
commit c9f2f47acb
5 changed files with 17 additions and 19 deletions

View File

@@ -125,12 +125,12 @@ struct MetaInfo {
}
// try to load weight information from file, if exists
inline bool TryLoadFloatInfo(const char *field, const char* fname, bool silent = false) {
std::vector<float> &weights = this->GetFloatInfo(field);
std::vector<float> &data = this->GetFloatInfo(field);
FILE *fi = fopen64(fname, "r");
if (fi == NULL) return false;
float wt;
while (fscanf(fi, "%f", &wt) == 1) {
weights.push_back(wt);
data.push_back(wt);
}
if (!silent) {
utils::Printf("loading %s from %s\n", field, fname);