Joseph Redmon
2015-03-30 6553b3f0e3e55fc30a99c7d4b5798aa86d18a114
src/crop_layer.c
@@ -28,7 +28,7 @@
    return layer;
}
void forward_crop_layer(const crop_layer layer, int train, float *input)
void forward_crop_layer(const crop_layer layer, network_state state)
{
    int i,j,c,b,row,col;
    int index;
@@ -36,7 +36,7 @@
    int flip = (layer.flip && rand()%2);
    int dh = rand()%(layer.h - layer.crop_height + 1);
    int dw = rand()%(layer.w - layer.crop_width + 1);
    if(!train){
    if(!state.train){
        flip = 0;
        dh = (layer.h - layer.crop_height)/2;
        dw = (layer.w - layer.crop_width)/2;
@@ -52,7 +52,7 @@
                    }
                    row = i + dh;
                    index = col+layer.w*(row+layer.h*(c + layer.c*b)); 
                    layer.output[count++] = input[index];
                    layer.output[count++] = state.input[index];
                }
            }
        }