mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Fixed timer
This commit is contained in:
2
Makefile
2
Makefile
@ -136,7 +136,7 @@ $(OBJDIR)%.o: %.c $(DEPS)
|
||||
$(CC) $(COMMON) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)%.o: %.cpp $(DEPS)
|
||||
$(CPP) $(COMMON) $(CFLAGS) -c $< -o $@
|
||||
$(CPP) -std=c++11 $(COMMON) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)%.o: %.cu $(DEPS)
|
||||
$(NVCC) $(ARCH) $(COMMON) --compiler-options "$(CFLAGS)" -c $< -o $@
|
||||
|
@ -795,6 +795,15 @@ LIB_API tree *read_tree(char *filename);
|
||||
LIB_API metadata get_metadata(char *file);
|
||||
|
||||
|
||||
// http_stream.h
|
||||
LIB_API double get_time_point();
|
||||
void start_timer();
|
||||
void stop_timer();
|
||||
double get_time();
|
||||
void stop_timer_and_show();
|
||||
void stop_timer_and_show_name(char *name);
|
||||
void show_total_time();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
@ -17,16 +17,6 @@ extern "C" {
|
||||
#include "cuda.h"
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
double get_time_point();
|
||||
void start_timer();
|
||||
void stop_timer();
|
||||
double get_time();
|
||||
void stop_timer_and_show();
|
||||
void stop_timer_and_show_name(char *name);
|
||||
void show_total_time();
|
||||
}
|
||||
|
||||
__global__ void binarize_kernel(float *x, int n, float *binary)
|
||||
{
|
||||
int i = (blockIdx.x + blockIdx.y*gridDim.x) * blockDim.x + threadIdx.x;
|
||||
|
@ -27,14 +27,6 @@ image image_data_augmentation(IplImage* ipl, int w, int h,
|
||||
float jitter, float dhue, float dsat, float dexp);
|
||||
#endif // OPENCV
|
||||
|
||||
double get_time_point();
|
||||
void start_timer();
|
||||
void stop_timer();
|
||||
double get_time();
|
||||
void stop_timer_and_show();
|
||||
void stop_timer_and_show_name(char *name);
|
||||
void show_total_time();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -192,8 +192,6 @@ network make_network(int n)
|
||||
return net;
|
||||
}
|
||||
|
||||
double get_time_point();
|
||||
|
||||
void forward_network(network net, network_state state)
|
||||
{
|
||||
state.workspace = net.workspace;
|
||||
|
@ -786,10 +786,14 @@ network parse_network_cfg_custom(char *filename, int batch)
|
||||
l = parse_avgpool(options, params);
|
||||
}else if(lt == ROUTE){
|
||||
l = parse_route(options, params, net);
|
||||
int k;
|
||||
for (k = 0; k < l.n; ++k) net.layers[l.input_layers[k]].use_bin_output = 0;
|
||||
}else if (lt == UPSAMPLE) {
|
||||
l = parse_upsample(options, params, net);
|
||||
}else if(lt == SHORTCUT){
|
||||
l = parse_shortcut(options, params, net);
|
||||
net.layers[count - 1].use_bin_output = 0;
|
||||
net.layers[l.index].use_bin_output = 0;
|
||||
}else if(lt == DROPOUT){
|
||||
l = parse_dropout(options, params);
|
||||
l.output = net.layers[count-1].output;
|
||||
|
Reference in New Issue
Block a user