Joseph Redmon
2015-04-15 47528e37cf29e0f9da6885213e5aee044bed84ef
src/crop_layer.c
@@ -37,6 +37,8 @@
    int flip = (layer.flip && rand()%2);
    int dh = rand()%(layer.h - layer.crop_height + 1);
    int dw = rand()%(layer.w - layer.crop_width + 1);
    float scale = 2;
    float trans = -1;
    if(!state.train){
        flip = 0;
        dh = (layer.h - layer.crop_height)/2;
@@ -53,7 +55,7 @@
                    }
                    row = i + dh;
                    index = col+layer.w*(row+layer.h*(c + layer.c*b)); 
                    layer.output[count++] = state.input[index];
                    layer.output[count++] = state.input[index]*scale + trans;
                }
            }
        }