projects
/
platform
/
upstream
/
caffeonacl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5962c59
)
Update solver.cpp
author
Sergio Guadarrama
<sguada@gmail.com>
Mon, 3 Feb 2014 21:20:05 +0000
(13:20 -0800)
committer
Sergio Guadarrama
<sguada@gmail.com>
Mon, 3 Feb 2014 21:20:05 +0000
(13:20 -0800)
Added these two conditions before trying SetDevice
param_.solver_mode() && param_.has_device_id()
src/caffe/solver.cpp
patch
|
blob
|
history
diff --git
a/src/caffe/solver.cpp
b/src/caffe/solver.cpp
index
731ae38
..
f344cca
100644
(file)
--- a/
src/caffe/solver.cpp
+++ b/
src/caffe/solver.cpp
@@
-40,7
+40,7
@@
Solver<Dtype>::Solver(const SolverParameter& param)
template <typename Dtype>
void Solver<Dtype>::Solve(const char* resume_file) {
Caffe::set_mode(Caffe::Brew(param_.solver_mode()));
- if (param_.solver_mode()) {
+ if (param_.solver_mode()
&& param_.has_device_id()
) {
Caffe::SetDevice(param_.device_id());
}
Caffe::set_phase(Caffe::TRAIN);