Fixed fread() for net->seen

This commit is contained in:
AlexeyAB
2017-10-21 23:56:07 +03:00
parent e50489bcd7
commit ae74d0ef31
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@
#ifndef NETWORK_H
#define NETWORK_H
#include <stdint.h>
#include "layer.h"
#ifdef __cplusplus
@ -20,7 +21,7 @@ typedef struct network{
float *workspace;
int n;
int batch;
int *seen;
uint64_t *seen;
float epoch;
int subdivisions;
float momentum;

View File

@ -836,7 +836,7 @@ void save_weights_upto(network net, char *filename, int cutoff)
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){