在caffe中计算某个model的整个net以及各个layer的向前向后传播时间,可以使用下面的命令格式:

./build/tools/caffe time --model=examples/mnist/mytest/execise1_train_test.prototxt -iterations 100 -gpu 0

其中model指向待测model的prototxt文件,-iterations后面的100表示迭代100次,-gpu 0 表示使用第一张显卡来计算时间,若使用CPU计算,将solver.prototxt的GPU改成CPU,并将-gpu 0去掉就行

./build/tools/caffe time --model=examples/mnist/mytest/execise1_train_test.prototxt -iterations 100

 

相关文章:

  • 2021-05-14
  • 2021-06-02
  • 2021-06-27
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
猜你喜欢
  • 2021-11-28
  • 2021-05-12
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2021-12-10
  • 2021-05-12
相关资源
相似解决方案