mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Fixed darknet.py - uses batch=1 by default
This commit is contained in:
@ -30,11 +30,11 @@
|
||||
#include "yolo_layer.h"
|
||||
#include "parser.h"
|
||||
|
||||
network *load_network(char *cfg, char *weights, int clear)
|
||||
network *load_network_custom(char *cfg, char *weights, int clear, int batch)
|
||||
{
|
||||
printf(" Try to load cfg: %s, weights: %s, clear = %d \n", cfg, weights, clear);
|
||||
network *net = calloc(1, sizeof(network));
|
||||
*net = parse_network_cfg(cfg);
|
||||
*net = parse_network_cfg_custom(cfg, batch);
|
||||
if (weights && weights[0] != 0) {
|
||||
load_weights(net, weights);
|
||||
}
|
||||
@ -42,6 +42,11 @@ network *load_network(char *cfg, char *weights, int clear)
|
||||
return net;
|
||||
}
|
||||
|
||||
network *load_network(char *cfg, char *weights, int clear)
|
||||
{
|
||||
return load_network_custom(cfg, weights, clear, 0);
|
||||
}
|
||||
|
||||
int get_current_batch(network net)
|
||||
{
|
||||
int batch_num = (*net.seen)/(net.batch*net.subdivisions);
|
||||
|
Reference in New Issue
Block a user