I WISH I HAD SOME TESTS THOUGH

This commit is contained in:
Joseph Redmon
2017-11-21 11:34:46 -08:00
parent 16686cec57
commit 56be49aa48
6 changed files with 16 additions and 12 deletions

View File

@@ -236,7 +236,7 @@ void backward_convolutional_layer_gpu(convolutional_layer l, network net)
float *b = net.workspace;
float *c = l.weight_updates_gpu + j*l.nweights/l.groups;
float *im = net.input+(i*l.groups + j)*l.c/l.groups*l.h*l.w;
float *im = net.input_gpu+(i*l.groups + j)*l.c/l.groups*l.h*l.w;
im2col_gpu(im, l.c/l.groups, l.h, l.w,
l.size, l.stride, l.pad, b);

View File

@@ -150,24 +150,24 @@ void cudnn_convolutional_setup(layer *l)
l->weightDesc,
l->convDesc,
l->dstTensorDesc,
CUDNN_CONVOLUTION_FWD_PREFER_FASTEST,
0,
CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT,
4000000000,
&l->fw_algo);
cudnnGetConvolutionBackwardDataAlgorithm(cudnn_handle(),
l->weightDesc,
l->ddstTensorDesc,
l->convDesc,
l->dsrcTensorDesc,
CUDNN_CONVOLUTION_BWD_DATA_PREFER_FASTEST,
0,
CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
4000000000,
&l->bd_algo);
cudnnGetConvolutionBackwardFilterAlgorithm(cudnn_handle(),
l->srcTensorDesc,
l->ddstTensorDesc,
l->convDesc,
l->dweightDesc,
CUDNN_CONVOLUTION_BWD_FILTER_PREFER_FASTEST,
0,
CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT,
4000000000,
&l->bf_algo);
}
#endif

View File

@@ -389,6 +389,7 @@ int resize_network(network *net, int w, int h)
error("Cannot resize this type of layer");
}
if(l.workspace_size > workspace_size) workspace_size = l.workspace_size;
if(l.workspace_size > 2000000000) assert(0);
inputs = l.outputs;
net->layers[i] = l;
w = l.out_w;