From cdd1cb0e8c4fda3671714bb5ad6ba1825cff16d1 Mon Sep 17 00:00:00 2001
From: Puneet Kohli <punkohl@gmail.com>
Date: Sun, 06 May 2018 21:45:26 +0000
Subject: [PATCH] Change matplotlib backend to 'agg' when 'show_plot' is false. This allows the script to be run from command line without any errors (for ex, on a remote machine)
---
src/network.h | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/src/network.h b/src/network.h
index e48cbc2..fe160a9 100644
--- a/src/network.h
+++ b/src/network.h
@@ -2,8 +2,14 @@
#ifndef NETWORK_H
#define NETWORK_H
-#include "image.h"
+#include <stdint.h>
#include "layer.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "image.h"
#include "data.h"
#include "tree.h"
@@ -15,7 +21,7 @@
float *workspace;
int n;
int batch;
- int *seen;
+ int *seen;
float epoch;
int subdivisions;
float momentum;
@@ -46,11 +52,13 @@
int h, w, c;
int max_crop;
int min_crop;
+ int flip; // horizontal flip 50% probability augmentaiont for classifier training (default = 1)
float angle;
float aspect;
float exposure;
float saturation;
float hue;
+ int small_object;
int gpu_index;
tree *hierarchy;
@@ -58,6 +66,11 @@
#ifdef GPU
float **input_gpu;
float **truth_gpu;
+ float **input16_gpu;
+ float **output16_gpu;
+ size_t *max_input16_size;
+ size_t *max_output16_size;
+ int wait_stream;
#endif
} network;
@@ -101,7 +114,7 @@
float train_network_datum(network net, float *x, float *y);
matrix network_predict_data(network net, data test);
-float *network_predict(network net, float *input);
+YOLODLL_API float *network_predict(network net, float *input);
float network_accuracy(network net, data d);
float *network_accuracies(network net, data d, int n);
float network_accuracy_multi(network net, data d, int n);
@@ -121,9 +134,23 @@
void set_batch_network(network *net, int b);
int get_network_input_size(network net);
float get_network_cost(network net);
+YOLODLL_API detection *get_network_boxes(network *net, int w, int h, float thresh, float hier, int *map, int relative, int *num, int letter);
+YOLODLL_API detection *make_network_boxes(network *net, float thresh, int *num);
+YOLODLL_API void free_detections(detection *dets, int n);
+YOLODLL_API void reset_rnn(network *net);
+YOLODLL_API network *load_network(char *cfg, char *weights, int clear);
+YOLODLL_API float *network_predict_image(network *net, image im);
+YOLODLL_API void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, int ngpus, int clear, int dont_show);
+YOLODLL_API int network_width(network *net);
+YOLODLL_API int network_height(network *net);
int get_network_nuisance(network net);
int get_network_background(network net);
+void fuse_conv_batchnorm(network net);
+
+#ifdef __cplusplus
+}
+#endif
#endif
--
Gitblit v1.10.0