-
assigned issue to
Fine-tune B-CNN models on cub failed
When invoked 'run run_experiments_bcnn_train.m' from MATLAB:
error use vl_argparse (line 99)
Unknown parameter 'cropSize'
error vl_argparse (line 79)
opts = vl_argparse(opts, vertcat(params,values)) ;
error imdb_get_batch_bcnn (line 35)
opts(i) = vl_argparse(opts(i), {varargin{1}(i),varargin{2:end}});
error getBatchSimpleNNWrapper>getBatchSimpleNN (line 10)
im = imdb_get_batch_bcnn(images, opts, 'prefetch', nargout == 0);
error getBatchSimpleNNWrapper>@(imdb,batch)getBatchSimpleNN(imdb,batch,opts) (line 4)
fn = @(imdb, batch) getBatchSimpleNN(imdb, batch, opts) ;
error initializeNetworkSharedWeights (line 117)
[im, labels] = getBatchFn(imdb, batch) ;
error imdb_bcnn_train_dag (line 65)
net = initNetFn(imdb, encoderOpts, opts);
error run_experiments_bcnn_train (line 79)
imdb_bcnn_train_dag(imdb, opts);
error run (line 96)
evalin('caller', [script ';']);
Comments (11)
-
reporter -
reporter -
assigned issue to
-
assigned issue to
-
repo owner Did you modify the code? I didn't see any option "cropSize" in my implementation. You need to give a default value to the option If you want to add more. To be clear, before you pass opts to vl_argparse, 'cropSize' should be a field in opts.
-
reporter For validating this error, I just do a clean clone and re-run 'run run_experiments_bcnn_train.m' again, but still got this error.
-
reporter I setup a breakpoint at line 35 https://bitbucket.org/tsungyu/bcnn/src/e0a84034814a073738bdd208b876a02953f31805/imdb_get_batch_bcnn.m?at=master&fileviewer=file-view-default#imdb_get_batch_bcnn.m-35 and output the value of varargin{1}:
varargin{1} ans = struct: imageSize: [224 224 3 10] keepAspect: 1 averageImage: [224×224×3 double] border: [32 32] cropSize: [0.8750 0.8750] interpolation: 'bilinear' numThreads: 12 transformation: 'none' rgbVariance: [] scale: 2
You can see there is a field named cropSize indeed, however, opts has no corresponding field. So maybe this why the vl_argparse error.
-
reporter By the way, if add opts(i).cropSize = [1.0, 1.0]; at the line 35 https://bitbucket.org/tsungyu/bcnn/src/e0a84034814a073738bdd208b876a02953f31805/imdb_get_batch_bcnn.m?at=master&fileviewer=file-view-default#imdb_get_batch_bcnn.m-35, now I can run run_experiments_bcnn_train.m. However, there will be a segmentation fault like:
I test this on a small dataset. And if you want to validate it, I can send the dataset to you.
-
repo owner Seems the format of the matconvnet pre-trained models hs changed. I'll suggest to download the models in the previous version from here: http://www.vlfeat.org/matconvnet/models . The one in beta18 folder should work.
-
reporter I think you are right. I check the net.meta structure, and find the cropSize field comes from the pre-trained model, which I download from matconvnet website, but it seems that this model has different format with the one trained from lower version of matconvnet. I will check it again.
-
reporter The cropSize field problem was resolved by using the older model, however, the MATLAB System Error still exist. I don't know if it is caused by my software stack: matlab r2016b, cuda 8.0, cudnn 5.1 and matconvnet beta19. @tsungyu May you try the current repo with cub again to see if this segment fault exist?
-
repo owner I have tested my code using MatcConvnet beta19, Matlab 2014b, cuda 7.5 and cudnn5.0. I guess the cuda version might be the problem. Could you try downgrade the cuda version ans see if the error still exists?
-
reporter My current GPU GTX 1070 depends on cuda 8.0, so I need to will find other hardware for testing. By the way, does bcnn support cpu training? I try to set useGpu to 0, but it seems that it doesn't work though.
- Log in to comment