AlexeyAB
2017-10-21 ae74d0ef31485f84e1856b4733135d2753dbb033
Fixed fread() for net->seen
2 files modified
5 ■■■■■ changed files
src/network.h 3 ●●●● patch | view | raw | blame | history
src/parser.c 2 ●●● patch | view | raw | blame | history
src/network.h
@@ -2,6 +2,7 @@
#ifndef NETWORK_H
#define NETWORK_H
#include <stdint.h>
#include "layer.h"
#ifdef __cplusplus
@@ -20,7 +21,7 @@
    float *workspace;
    int n;
    int batch;
    int *seen;
    uint64_t *seen;
    float epoch;
    int subdivisions;
    float momentum;
src/parser.c
@@ -836,7 +836,7 @@
    fwrite(&major, sizeof(int), 1, fp);
    fwrite(&minor, sizeof(int), 1, fp);
    fwrite(&revision, sizeof(int), 1, fp);
    fwrite(net.seen, sizeof(int), 1, fp);
    fwrite(net.seen, sizeof(uint64_t), 1, fp);
    int i;
    for(i = 0; i < net.n && i < cutoff; ++i){