Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. gdb --args .build_debug/tools/caffe train --solver=examples/mnist/lenet_solver.prototxt
  2.  
  3. inline Dtype Layer<Dtype>::Forward(const vector<Blob<Dtype>*>& bottom,
  4. const vector<Blob<Dtype>*>& top)
  5.  
  6. (gdb) p bottom
  7. $30 = std::vector of length 2, capacity 2 = {0x4c24300, 0x4b12fd0}
  8. (gdb) what bottom
  9. type = const std::vector<caffe::Blob<float>*, std::allocator<caffe::Blob<float>*> > &
  10. (gdb) what bottom[0]
  11. type = std::vector<caffe::Blob<float>*, std::allocator<caffe::Blob<float>*> >::reference
  12. (gdb) what bottom[0][0]
  13. type = caffe::Blob<float>
  14.  
  15. (gdb) p bottom[0][0]
  16. $42 = {
  17. data_ = {
  18. px = 0x4c23710,
  19. pn = {
  20. pi_ = 0x4c23740
  21. }
  22. },
  23. diff_ = {
  24. px = 0x4c23fc0,
  25. pn = {
  26. pi_ = 0x4c23ff0
  27. }
  28. },
  29. shape_data_ = {
  30. px = 0x4c23f00,
  31. pn = {
  32. pi_ = 0x4c23f30
  33. }
  34. },
  35. shape_ = std::vector of length 2, capacity 2 = {100, 10},
  36. count_ = 1000,
  37. capacity_ = 1000
  38. }
  39.  
  40. (gdb) p bottom[0][0].data_
  41. $43 = {
  42. px = 0x4c23710,
  43. pn = {
  44. pi_ = 0x4c23740
  45. }
  46. }
  47. (gdb) p bottom[0][0].data_.px[0]
  48. $44 = {
  49. cpu_ptr_ = 0x474fef0,
  50. gpu_ptr_ = 0x0,
  51. size_ = 4000,
  52. head_ = caffe::SyncedMemory::HEAD_AT_CPU,
  53. own_cpu_data_ = true,
  54. cpu_malloc_use_cuda_ = false,
  55. own_gpu_data_ = false,
  56. gpu_device_ = -1
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement