Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ghimiredhikura committed Nov 21, 2018
1 parent 92145c8 commit a0362aa
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
Binary file removed bin/yolo_cpu.exe
Binary file not shown.
1 change: 0 additions & 1 deletion bin/yolov2-voc.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ scales=.1,.1

input_calibration = 15.8025, 11.6111, 10.9857, 14.9883, 11.6514, 14.9023, 15.4301, 13.8702, 15.3739, 15.584, 15.3044, 15.4963, 15.4139, 15.398, 15.7311, 15.2932, 15.7355, 15.2879, 5.79389, 15.6349, 15.5533, 15.453, 15.7935, 16


[convolutional]
batch_normalize=1
filters=32
Expand Down
2 changes: 2 additions & 0 deletions src/additionally.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,14 @@ void binary_align_weights(convolutional_layer *l)
l->align_bit_weights = calloc(l->align_bit_weights_size, sizeof(char));

size_t i, j;

// align A without transpose
for (i = 0; i < m; ++i) {
for (j = 0; j < k; ++j) {
align_weights[i*new_lda + j] = l->binary_weights[i*k + j];
}
}

float_to_bit(align_weights, l->align_bit_weights, align_weights_size);

l->mean_arr = calloc(l->n, sizeof(float));
Expand Down
3 changes: 2 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ int main(int argc, char **argv)
}

_mkdir("dbg");
m_dbg = 1;

m_dbg = 0;

if (argc < 2) {
fprintf(stderr, "usage: %s <function>\n", argv[0]);
Expand Down
4 changes: 3 additions & 1 deletion src/yolov2_forward_network.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "additionally.h" // some definitions from: im2col.h, blas.h, list.h, utils.h, activations.h, tree.h, layer.h, network.h
// softmax_layer.h, reorg_layer.h, route_layer.h, region_layer.h, maxpool_layer.h, convolutional_layer.h


// binary transpose
size_t binary_transpose_align_input(int k, int n, float *b, char **t_bit_input, size_t ldb_align, int bit_align)
{
Expand Down Expand Up @@ -30,7 +31,7 @@ void forward_convolutional_layer_cpu(layer l, int layer_id, network_state state)
if (!l.align_bit_weights)
{
binarize_weights(l.weights, l.n, l.c*l.size*l.size, l.binary_weights);
//printf("\n binarize_weights l.align_bit_weights = %p \n", l.align_bit_weights);
printf("\n binarize_weights l.align_bit_weights = %p \n", l.align_bit_weights);
}

binarize_cpu(state.input, l.c*l.h*l.w*l.batch, l.binary_input);
Expand Down Expand Up @@ -92,6 +93,7 @@ void forward_convolutional_layer_cpu(layer l, int layer_id, network_state state)
}
}


int const out_size = out_h*out_w;

// 2. Batch normalization
Expand Down

0 comments on commit a0362aa

Please sign in to comment.