From cbc9984a17b3452da4fee397aac912f1e9f7a4c3 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Wed, 10 Jun 2015 07:11:41 +0000
Subject: [PATCH] NIPS
---
src/crop_layer_kernels.cu | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/crop_layer_kernels.cu b/src/crop_layer_kernels.cu
index 98d1ef4..d60cc0a 100644
--- a/src/crop_layer_kernels.cu
+++ b/src/crop_layer_kernels.cu
@@ -114,9 +114,9 @@
size_t offset = id * h * w * 3;
image += offset;
- float r = image[x + w*(y + h*2)];
+ float r = image[x + w*(y + h*0)];
float g = image[x + w*(y + h*1)];
- float b = image[x + w*(y + h*0)];
+ float b = image[x + w*(y + h*2)];
float3 rgb = make_float3(r,g,b);
if(train){
float3 hsv = rgb_to_hsv_kernel(rgb);
@@ -124,9 +124,9 @@
hsv.z *= exposure;
rgb = hsv_to_rgb_kernel(hsv);
}
- image[x + w*(y + h*2)] = rgb.x*scale + translate;
+ image[x + w*(y + h*0)] = rgb.x*scale + translate;
image[x + w*(y + h*1)] = rgb.y*scale + translate;
- image[x + w*(y + h*0)] = rgb.z*scale + translate;
+ image[x + w*(y + h*2)] = rgb.z*scale + translate;
}
__global__ void forward_crop_layer_kernel(float *input, float *rand, int size, int c, int h, int w, int crop_height, int crop_width, int train, int flip, float angle, float *output)
--
Gitblit v1.10.0