-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in python " ArgumentError: Python argument types in Net.__init__(Net, str, str)" #6097
Comments
A call to Also please do not post usage, installation, or modeling questions, or other requests for help to Issues. Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe. Please read the guidelines for contributing before submitting an issue or a pull request. |
Hi @gromzhu, have you resolved it just by
and after I made adjustment according to #3220 // Net constructor for passing phase as int
shared_ptr<Net<Dtype> > Net_Init(
-- // string param_file, int phase) {
++ // https://github.com/BVLC/caffe/issues/3220
++ char *param_file, int phase) {
CheckFile(param_file);
shared_ptr<Net<Dtype> > net(new Net<Dtype>(param_file,
static_cast<Phase>(phase)));
return net;
}
// Net construct-and-load convenience constructor
shared_ptr<Net<Dtype> > Net_Init_Load(
--// string param_file, string pretrained_param_file, int phase) {
++// https://github.com/BVLC/caffe/issues/3220
++char * param_file, char * pretrained_param_file, int phase) {
CheckFile(param_file);
CheckFile(pretrained_param_file); I still obtain the following:
|
hi,all
I tried to init a net with the python code:
net = caffe.Net(modelDef,modelWeights)
The following error is reported:
ArgumentError: Python argument types in Net.__init__(Net, str, str) did not match C++ signature: __init__(class boost::python::api::object, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >, int) __init__(class boost::python::api::object, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > network_file, int phase, int level=0, class boost::python::api::object stages=None, class boost::python::api::object weights=None)
my system configuration
Operating system: win7
Compiler: vs2015
Python version : 2.7
caffe is cpu-only
The text was updated successfully, but these errors were encountered: