From 37d7c1e79f65a75caf87e29a562d30c51cd654e5 Mon Sep 17 00:00:00 2001
From: Joe Redmon <pjreddie@gmail.com>
Date: Thu, 26 Nov 2015 21:52:56 +0000
Subject: [PATCH] fixed label linking
---
src/crop_layer.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/crop_layer.c b/src/crop_layer.c
index 1319021..7b34084 100644
--- a/src/crop_layer.c
+++ b/src/crop_layer.c
@@ -33,7 +33,7 @@
l.output = calloc(crop_width*crop_height * c*batch, sizeof(float));
#ifdef GPU
l.output_gpu = cuda_make_array(l.output, crop_width*crop_height*c*batch);
- l.rand_gpu = cuda_make_array(0, l.batch*8);
+ l.rand_gpu = cuda_make_array(0, l.batch*8);
#endif
return l;
}
@@ -48,6 +48,10 @@
int dw = rand()%(l.w - l.crop_width + 1);
float scale = 2;
float trans = -1;
+ if(l.noadjust){
+ scale = 1;
+ trans = 0;
+ }
if(!state.train){
flip = 0;
dh = (l.h - l.crop_height)/2;
--
Gitblit v1.10.0