Error using: cross_validate_c_bias>(parfor body) (line 38)
Feesics opened this issue · 5 comments
Thanks for your code, but it occurrs the following errors. Can you tell me how to deal with it?
Error using cross_validate_c_bias>(parfor body) (line 38)
An UndefinedFunction error was thrown on the workers for 'train'. This might be because the file containing 'train' is not accessible on the workers. Use
addAttachedFiles(pool, files) to specify the required files to be attached. See the documentation for 'parallel.Pool/addAttachedFiles' for more details.
Error in cross_validate_c_bias (line 34)
parfor i_bb=1:length(X)
Error in iterativeLR (line 102)
[lr_model, lr_params, ind_to_rem_tmp] = cross_validate_c_bias(-kcca_featAll,train_labelsAll,lr_params);
Error in Demo_MCKCCA (line 94)
[kcca_featAll, train_labelsAll, lr_model, minS, maxS, ind_to_rem, lr_params] = ...
Caused by:
Undefined function 'train' for input arguments of type 'double'.
Hi @Feesics, thanks for trying out our code. To let us help you get it running, can you tell us:
- Which operating system and MATLAB version are you using?
- Did you run the
startup.m
script without encountering any issues?
Hi @Feesics, thanks for trying out our code. To let us help you get it running, can you tell us:
- Which operating system and MATLAB version are you using?
- Did you run the
startup.m
script without encountering any issues?
I use MATLAB R2015b on Ubuntu16.04 LTS. When I run the startup.m script, there is no issue.
Hi @Feesics, I do not have access to that exact configuration you are trying but was able to run the code properly under Ubuntu 16.04 LTS and MATLAB R2017a.
Without being able to reproduce the issue, my best guess is that MATLAB R2015b is not properly setting the path (and thus does not contain the liblinear
function train
) for the workers in the parfor
, see similar matlab path issue with parfor.
So, I have forced the worker path to contain the liblinear
folder in the utils/cross_validate_c_bias.m.
Can you pull and try again?
Great! Closing the issue then. Thanks for reporting it.