转自:http://blog.csdn.net/jasonzzj/article/details/53355100

由于在ubuntu中使用caffe的程序时,都使用.sh文件,该文件中常见的命令为:

./build/tools/caffe train --solver=examples/testXXX/solver.prototxt

 

当电脑中有多个GPU时,默认使用GPU0。如果想使用其他的GPU,可以将该文件内容修改如下:

./build/tools/caffe train --solver=examples/testXXX/solver.prototxt --gpu 2

注意,Caffe中默认编号从0开始,因而–GPU 2的意思是使用第3个GPU。如果要使用多个GPU,可以使用如下命令:

./build/tools/caffe train --solver=examples/testXXX/solver.prototxt --gpu 0,1,2,3

则使用0,1,2,3这4个GPU。如果要使用所有的GPU,可使用如下命令:

./build/tools/caffe train --solver=examples/testXXX/solver.prototxt --gpu all

注意,使用的GPU越多,开始初始化时时间越久。当然,训练速度越快

转自:http://blog.csdn.net/jasonzzj/article/details/53355100

由于在ubuntu中使用caffe的程序时,都使用.sh文件,该文件中常见的命令为:

./build/tools/caffe train --solver=examples/testXXX/solver.prototxt

 

当电脑中有多个GPU时,默认使用GPU0。如果想使用其他的GPU,可以将该文件内容修改如下:

./build/tools/caffe train --solver=examples/testXXX/solver.prototxt --gpu 2

注意,Caffe中默认编号从0开始,因而–GPU 2的意思是使用第3个GPU。如果要使用多个GPU,可以使用如下命令:

./build/tools/caffe train --solver=examples/testXXX/solver.prototxt --gpu 0,1,2,3

则使用0,1,2,3这4个GPU。如果要使用所有的GPU,可使用如下命令:

./build/tools/caffe train --solver=examples/testXXX/solver.prototxt --gpu all

注意,使用的GPU越多,开始初始化时时间越久。当然,训练速度越快

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-05-04
  • 2022-01-15
  • 2022-12-23
  • 2021-07-30
猜你喜欢
  • 2021-08-20
  • 2021-04-19
  • 2021-05-23
  • 2021-08-11
  • 2022-12-23
  • 2022-01-13
相关资源
相似解决方案