mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
I WISH I HAD SOME TESTS THOUGH
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user