Error: The number of filter groups does not divide the total number of filters.
2017-11-06 10:57
1606 查看
Matcovnet 遇到了这个错误,查了资料才知道是filter的channel数目不对,查看手册发现:
Y = VL_NNCONV(X, F, B) computes the convolution of the image X with the filter bank F and biases B. If B is the empty matrix, then no biases are added. If F is the empty matrix, then the function does not filter the image, but still adds the biases and applies
downsampling and padding as explained below.
X is an array of dimension H x W x C x N where (H,W) are the height and width of the image stack, C is the number of feature channels, and N is the number of images in the batch.
F is an array of dimension FW x FH x FC x K where (FH,FW) are the filter height and width and K the number o filters in the bank. FC is the number of feature channels in each filter and must match the number of feature channels C in X. Alternatively,
FC can
divide* the C; in this case, filters are assumed to form G=C/FC
groups* of equal size (where G must divide K). Each group of
filters works on a consecutive subset of feature channels of the input array X.
黑色的是重点,要求FC与C关系,不然会报错。
这个提问,可以参考下。
https://github.com/vlfeat/matconvnet/issues/222
Hi, your data has 384 channels, and your filters only one channel. This means that there are 384 filter groups, one for each channel, and each containing one filter. If this is your intention, you should have 384 filters, each of which will act independently
on a corresponding input dimension (note that working with many small groups is not implemented very efficiently in the library).
However, I think you meant to create filters with 384 dimensions instead. If this is the case the filters should be
On 29 Jul 2015, at 11:16, Kevin Chen notifications@github.com wrote:
Hi, guys. In my implementation, the first layer was displayed for error using : the number of filter groups does not divide the total number of filters. So I wondered why I got this error message. Can anyone help
me out? Thanks a lot.
% layer 1: convolution
net.layers{end+1} = struct('type', 'conv', ...
'filters', f*randn(7,7,1,50, 'single'), ...
'biases', zeros(1, 50,'single'), ...
'stride', 1, ...
'pad', 0) ;
l.filters =
7 7 1 50
l.biases =
1 50
res(i).x =
.
32 32 384 100
Error using vl_nnconv
The number of filter groups does not divide the total number of filters.
Error in vl_simplenn (line 156)
res(i+1).x = vl_nnconv(res(i).x, l.filters, l.biases, 'pad', l.pad, 'stride', l.stride) ;
Error in cnn_train (line 141)
res = vl_simplenn(net, im, one, res, ...
Error in cnn_LIVEII (line 93)
[net,info] = cnn_train(net, imdb, @getbatch, ... % "net" with above-defined layers
—
Reply to this email directly or view it on GitHub #222.
VL_NNCONV
- CNN convolution.
Y = VL_NNCONV(X, F, B) computes the convolution of the image X with the filter bank F and biases B. If B is the empty matrix, then no biases are added. If F is the empty matrix, then the function does not filter the image, but still adds the biases and appliesdownsampling and padding as explained below.
X is an array of dimension H x W x C x N where (H,W) are the height and width of the image stack, C is the number of feature channels, and N is the number of images in the batch.
F is an array of dimension FW x FH x FC x K where (FH,FW) are the filter height and width and K the number o filters in the bank. FC is the number of feature channels in each filter and must match the number of feature channels C in X. Alternatively,
FC can
divide* the C; in this case, filters are assumed to form G=C/FC
groups* of equal size (where G must divide K). Each group of
filters works on a consecutive subset of feature channels of the input array X.
黑色的是重点,要求FC与C关系,不然会报错。
这个提问,可以参考下。
https://github.com/vlfeat/matconvnet/issues/222
Hi, your data has 384 channels, and your filters only one channel. This means that there are 384 filter groups, one for each channel, and each containing one filter. If this is your intention, you should have 384 filters, each of which will act independently
on a corresponding input dimension (note that working with many small groups is not implemented very efficiently in the library).
However, I think you meant to create filters with 384 dimensions instead. If this is the case the filters should be
randn(7,7,384,50, 'single’).
On 29 Jul 2015, at 11:16, Kevin Chen notifications@github.com wrote:
Hi, guys. In my implementation, the first layer was displayed for error using : the number of filter groups does not divide the total number of filters. So I wondered why I got this error message. Can anyone help
me out? Thanks a lot.
% layer 1: convolution
net.layers{end+1} = struct('type', 'conv', ...
'filters', f*randn(7,7,1,50, 'single'), ...
'biases', zeros(1, 50,'single'), ...
'stride', 1, ...
'pad', 0) ;
l.filters =
7 7 1 50
l.biases =
1 50
res(i).x =
.
32 32 384 100
Error using vl_nnconv
The number of filter groups does not divide the total number of filters.
Error in vl_simplenn (line 156)
res(i+1).x = vl_nnconv(res(i).x, l.filters, l.biases, 'pad', l.pad, 'stride', l.stride) ;
Error in cnn_train (line 141)
res = vl_simplenn(net, im, one, res, ...
Error in cnn_LIVEII (line 93)
[net,info] = cnn_train(net, imdb, @getbatch, ... % "net" with above-defined layers
—
Reply to this email directly or view it on GitHub #222.
相关文章推荐
- SSD-tensorflow:ValueError: number of input channels does not match corresponding dimension of filter
- Error: The version of SQL Server in use does not support datatype 'datetime2'
- mysql报错-ERROR 1206 (HY000)- The total number of locks exceeds the lock table size-的解决方法
- Fix the error of ""Server does not support secure connections. " ?" when sending email
- Error: The version of SQL Server in use does not support datatype 'datetime2
- 【MySQL笔记】mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
- Error: Java compiler level does not match the version of the installed Java project facet.
- mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
- ERROR 1206 (HY000): The total number of locks exceeds the lock table size 错误解决
- ERROR 1206 (HY000): The total number of locks exceeds the lock table size
- Maven构建项目后项目报Error错误Java compiler level does not match the version of the installed Java project fac
- A filter or servlet of the current chain does not support asynchronous operations
- MySql 5.1x InnoDB "ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
- ValueError: The hardcoded shape for thenumber of rows in the filter (5) isn't the run time shape (6)
- ERROR 1206 (HY000): The total number of locks exceeds the lock table size 错误解决
- Error starting the test run: Build directory of the test run is not specified or does not exist
- FATAL ERROR: The persistent cache of section information does not match the current configu...
- ERROR: The version of SQL Server in use does not support datatype 'datetime2'.
- mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
- mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法