Open wangjunqian opened 7 years ago
Hello, again! I changed the caffe-master, but the solver.cpp still have some problems. If I don't load the solver.cpp, the ''make'' operation is fine. I can use the caffemodel. Thank you for your sharing!
hello,can you share your solver.hpp ??
Because of the different caffe version, you may have problem when compiling the caffe. If so ,you can just modify the step function in your solver.cpp instead of directly using mine.
Which Caffe version did you use to compile the layers?. At moment I can compile yet, thanks a lot for your answer!
Hi ! Thank you for your sharing resource. I tried to make your files in my caffe. But there are some errors in 'solver.cpp' which I really don't know how to settle them. So, I want to ask you : Have you ever change the 'solver.hpp' file ? Or could you please give me suggestion to solve those issues. Thanks a lot !
CXX src/caffe/solver.cpp src/caffe/solver.cpp: In instantiation of ‘void caffe::Solver::Solve(const char) [with Dtype = float]’:
src/caffe/solver.cpp:509:1: required from here
src/caffe/solver.cpp:327:5: error: no matching function for call to ‘caffe::Net::Forward(float )’
net_->Forward(&loss);
^
src/caffe/solver.cpp:327:5: note: candidates are:
In file included from ./include/caffe/solver.hpp:7:0,
from src/caffe/solver.cpp:6:
./include/caffe/net.hpp:53:31: note: const std::vector<caffe::Blob>& caffe::Net::Forward(const std::vector<caffe::Blob >&, Dtype) [with Dtype = float]
const vector<Blob >& Forward(const vector<Blob > & bottom,
^
./include/caffe/net.hpp:53:31: note: no known conversion for argument 1 from ‘float’ to ‘const std::vector<caffe::Blob, std::allocator<caffe::Blob > >&’
./include/caffe/net.hpp:59:10: note: std::string caffe::Net::Forward(const string&, Dtype) [with Dtype = float; std::string = std::basic_string]
string Forward(const string& input_blob_protos, Dtype loss = NULL);
^
./include/caffe/net.hpp:59:10: note: no known conversion for argument 1 from ‘float’ to ‘const string& {aka const std::basicstring&}’
src/caffe/solver.cpp: In instantiation of ‘void caffe::Solver::Step(int) [with Dtype = float]’:
src/caffe/solver.cpp:509:1: required from here
src/caffe/solver.cpp:224:12: error: no matching function for call to ‘caffe::Net::ForwardBackward()’
loss += net ->ForwardBackward();
^
src/caffe/solver.cpp:224:12: note: candidate is:
In file included from ./include/caffe/solver.hpp:7:0,
from src/caffe/solver.cpp:6:
./include/caffe/net.hpp:85:9: note: Dtype caffe::Net::ForwardBackward(const std::vector<caffe::Blob >&) [with Dtype = float]
Dtype ForwardBackward(const vector<Blob > & bottom) {
^
./include/caffe/net.hpp:85:9: note: candidate expects 1 argument, 0 provided
src/caffe/solver.cpp: In instantiation of ‘void caffe::Solver::Test(int) [with Dtype = float]’:
src/caffe/solver.cpp:509:1: required from here
src/caffe/solver.cpp:377:37: error: no matching function for call to ‘caffe::Net::Forward(float )’
test_net->Forward(&iter_loss);
^
src/caffe/solver.cpp:377:37: note: candidates are:
In file included from ./include/caffe/solver.hpp:7:0,
from src/caffe/solver.cpp:6:
./include/caffe/net.hpp:53:31: note: const std::vector<caffe::Blob>& caffe::Net::Forward(const std::vector<caffe::Blob >&, Dtype) [with Dtype = float]
const vector<Blob >& Forward(const vector<Blob > & bottom,
^
./include/caffe/net.hpp:53:31: note: no known conversion for argument 1 from ‘float’ to ‘const std::vector<caffe::Blob, std::allocator<caffe::Blob > >&’
./include/caffe/net.hpp:59:10: note: std::string caffe::Net::Forward(const string&, Dtype) [with Dtype = float; std::string = std::basic_string]
string Forward(const string& input_blob_protos, Dtype loss = NULL);
^
./include/caffe/net.hpp:59:10: note: no known conversion for argument 1 from ‘float’ to ‘const string& {aka const std::basic_string&}’
src/caffe/solver.cpp: In instantiation of ‘void caffe::Solver::Solve(const char ) [with Dtype = double]’:
src/caffe/solver.cpp:509:1: required from here
src/caffe/solver.cpp:327:5: error: no matching function for call to ‘caffe::Net::Forward(double)’
net_->Forward(&loss);
^
src/caffe/solver.cpp:327:5: note: candidates are:
In file included from ./include/caffe/solver.hpp:7:0,
from src/caffe/solver.cpp:6:
./include/caffe/net.hpp:53:31: note: const std::vector<caffe::Blob >& caffe::Net::Forward(const std::vector<caffe::Blob>&, Dtype) [with Dtype = double]
const vector<Blob>& Forward(const vector<Blob > & bottom,
^
./include/caffe/net.hpp:53:31: note: no known conversion for argument 1 from ‘double’ to ‘const std::vector<caffe::Blob , std::allocator<caffe::Blob> >&’
./include/caffe/net.hpp:59:10: note: std::string caffe::Net::Forward(const string&, Dtype ) [with Dtype = double; std::string = std::basic_string]
string Forward(const string& input_blob_protos, Dtype loss = NULL);
^
./include/caffe/net.hpp:59:10: note: no known conversion for argument 1 from ‘double’ to ‘const string& {aka const std::basicstring&}’
src/caffe/solver.cpp: In instantiation of ‘void caffe::Solver::Step(int) [with Dtype = double]’:
src/caffe/solver.cpp:509:1: required from here
src/caffe/solver.cpp:224:12: error: no matching function for call to ‘caffe::Net::ForwardBackward()’
loss += net ->ForwardBackward();
^
src/caffe/solver.cpp:224:12: note: candidate is:
In file included from ./include/caffe/solver.hpp:7:0,
from src/caffe/solver.cpp:6:
./include/caffe/net.hpp:85:9: note: Dtype caffe::Net::ForwardBackward(const std::vector<caffe::Blob>&) [with Dtype = double]
Dtype ForwardBackward(const vector<Blob > & bottom) {
^
./include/caffe/net.hpp:85:9: note: candidate expects 1 argument, 0 provided
src/caffe/solver.cpp: In instantiation of ‘void caffe::Solver::Test(int) [with Dtype = double]’:
src/caffe/solver.cpp:509:1: required from here
src/caffe/solver.cpp:377:37: error: no matching function for call to ‘caffe::Net::Forward(double)’
test_net->Forward(&iter_loss);
^
src/caffe/solver.cpp:377:37: note: candidates are:
In file included from ./include/caffe/solver.hpp:7:0,
from src/caffe/solver.cpp:6:
./include/caffe/net.hpp:53:31: note: const std::vector<caffe::Blob >& caffe::Net::Forward(const std::vector<caffe::Blob>&, Dtype) [with Dtype = double]
const vector<Blob>& Forward(const vector<Blob > & bottom,
^
./include/caffe/net.hpp:53:31: note: no known conversion for argument 1 from ‘double’ to ‘const std::vector<caffe::Blob , std::allocator<caffe::Blob> >&’
./include/caffe/net.hpp:59:10: note: std::string caffe::Net::Forward(const string&, Dtype ) [with Dtype = double; std::string = std::basic_string]
string Forward(const string& input_blob_protos, Dtype loss = NULL);
^
./include/caffe/net.hpp:59:10: note: no known conversion for argument 1 from ‘double’ to ‘const string& {aka const std::basic_string&}’
make: *** [.build_release/src/caffe/solver.o] Error 1