mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Fixed fread() for net->seen
This commit is contained in:
@ -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;
|
||||
|
@ -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){
|
||||
|
Reference in New Issue
Block a user