Advertisement
lamiastella

at_assert vs at_check

Sep 24th, 2020
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.56 KB | None | 0 0
  1. (base) mona@mona:~/neural_renderer$ grep -ri assert
  2. neural_renderer/vertices_to_faces.py: assert (vertices.ndimension() == 3)
  3. neural_renderer/vertices_to_faces.py: assert (faces.ndimension() == 3)
  4. neural_renderer/vertices_to_faces.py: assert (vertices.shape[0] == faces.shape[0])
  5. neural_renderer/vertices_to_faces.py: assert (vertices.shape[2] == 3)
  6. neural_renderer/vertices_to_faces.py: assert (faces.shape[2] == 3)
  7. neural_renderer/save_obj.py: assert vertices.ndimension() == 2
  8. neural_renderer/save_obj.py: assert faces.ndimension() == 2
  9. .git/packed-refs:4d32436eb3c2d28c87c679ce854dbc4553ccfc0b refs/remotes/origin/at_assert_fix
  10. .git/logs/refs/heads/at_assert_fix:0000000000000000000000000000000000000000 4d32436eb3c2d28c87c679ce854dbc4553ccfc0b Mona Jalal <jalal@bu.edu> 1600971142 -0400 branch: Created from refs/remotes/origin/at_assert_fix
  11. .git/logs/HEAD:b2a1e6ce16a54f94f26f86fe1dc3814637e15251 4d32436eb3c2d28c87c679ce854dbc4553ccfc0b Mona Jalal <jalal@bu.edu> 1600971142 -0400 checkout: moving from master to at_assert_fix
  12. .git/config:[branch "at_assert_fix"]
  13. .git/config: merge = refs/heads/at_assert_fix
  14. .git/HEAD:ref: refs/heads/at_assert_fix
  15. Binary file build/temp.linux-x86_64-3.7/neural_renderer/cuda/load_textures_cuda_kernel.o matches
  16. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (vertices.ndimension() == 3)
  17. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (faces.ndimension() == 3)
  18. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (vertices.shape[0] == faces.shape[0])
  19. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (vertices.shape[2] == 3)
  20. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (faces.shape[2] == 3)
  21. build/lib.linux-x86_64-3.7/neural_renderer/save_obj.py: assert vertices.ndimension() == 2
  22. build/lib.linux-x86_64-3.7/neural_renderer/save_obj.py: assert faces.ndimension() == 2
  23. tests/test_rasterize_depth.py: assert(np.allclose(ref, image))
  24. tests/test_rasterize_depth.py: assert(np.allclose(image, ref, atol=1e-2))
  25. tests/test_rasterize_depth.py: assert(np.allclose(grad, grad2, atol=1e-3))
  26. tests/test_look_at.py: assert(np.allclose(transformed.data.squeeze().numpy(), np.array(a)))
  27. tests/test_rasterize_silhouettes.py: assert(np.allclose(ref, image))
  28. tests/test_rasterize_silhouettes.py: assert(np.allclose(vertices.grad, grad_ref, rtol=1e-2))
  29. tests/test_rasterize_silhouettes.py: assert(np.allclose(vertices.grad, grad_ref, rtol=1e-2))
  30. tests/test_perspective.py: assert(np.allclose(transformer.data.squeeze().numpy(), v_out))
  31. tests/test_save_obj.py: assert np.allclose(vertices, vertices2)
  32. tests/test_save_obj.py: assert np.allclose(faces, faces2)
  33. tests/test_rasterize.py: assert(np.allclose(ref, image))
  34. tests/test_rasterize.py: assert(torch.allclose(vertices.grad, grad_ref, rtol=1e-2))
  35. tests/test_rasterize.py: assert(torch.allclose(vertices.grad, grad_ref, rtol=1e-2))
  36. tests/test_load_obj.py: assert (np.allclose(vertices_ref, vertices))
  37. tests/test_load_obj.py: assert (np.allclose(faces_ref, faces))
  38. tests/test_load_obj.py: assert (np.allclose(vertices_ref * 2 - 1.0, vertices))
  39. tests/test_load_obj.py: assert (np.allclose(faces_ref, faces))
  40. tests/test_load_obj.py: assert (faces.shape[0] == 2464)
  41. tests/test_load_obj.py: assert (vertices.shape[0] == 1292)
  42. (base) mona@mona:~/neural_renderer$ git checkout master
  43. Switched to branch 'master'
  44. Your branch is up to date with 'origin/master'.
  45. (base) mona@mona:~/neural_renderer$ grep -ri assert
  46. neural_renderer/vertices_to_faces.py: assert (vertices.ndimension() == 3)
  47. neural_renderer/vertices_to_faces.py: assert (faces.ndimension() == 3)
  48. neural_renderer/vertices_to_faces.py: assert (vertices.shape[0] == faces.shape[0])
  49. neural_renderer/vertices_to_faces.py: assert (vertices.shape[2] == 3)
  50. neural_renderer/vertices_to_faces.py: assert (faces.shape[2] == 3)
  51. neural_renderer/save_obj.py: assert vertices.ndimension() == 2
  52. neural_renderer/save_obj.py: assert faces.ndimension() == 2
  53. .git/packed-refs:4d32436eb3c2d28c87c679ce854dbc4553ccfc0b refs/remotes/origin/at_assert_fix
  54. .git/logs/refs/heads/at_assert_fix:0000000000000000000000000000000000000000 4d32436eb3c2d28c87c679ce854dbc4553ccfc0b Mona Jalal <jalal@bu.edu> 1600971142 -0400 branch: Created from refs/remotes/origin/at_assert_fix
  55. .git/logs/HEAD:b2a1e6ce16a54f94f26f86fe1dc3814637e15251 4d32436eb3c2d28c87c679ce854dbc4553ccfc0b Mona Jalal <jalal@bu.edu> 1600971142 -0400 checkout: moving from master to at_assert_fix
  56. .git/logs/HEAD:4d32436eb3c2d28c87c679ce854dbc4553ccfc0b b2a1e6ce16a54f94f26f86fe1dc3814637e15251 Mona Jalal <jalal@bu.edu> 1600971478 -0400 checkout: moving from at_assert_fix to master
  57. .git/config:[branch "at_assert_fix"]
  58. .git/config: merge = refs/heads/at_assert_fix
  59. Binary file build/temp.linux-x86_64-3.7/neural_renderer/cuda/load_textures_cuda_kernel.o matches
  60. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (vertices.ndimension() == 3)
  61. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (faces.ndimension() == 3)
  62. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (vertices.shape[0] == faces.shape[0])
  63. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (vertices.shape[2] == 3)
  64. build/lib.linux-x86_64-3.7/neural_renderer/vertices_to_faces.py: assert (faces.shape[2] == 3)
  65. build/lib.linux-x86_64-3.7/neural_renderer/save_obj.py: assert vertices.ndimension() == 2
  66. build/lib.linux-x86_64-3.7/neural_renderer/save_obj.py: assert faces.ndimension() == 2
  67. tests/test_rasterize_depth.py: assert(np.allclose(ref, image))
  68. tests/test_rasterize_depth.py: assert(np.allclose(image, ref, atol=1e-2))
  69. tests/test_rasterize_depth.py: assert(torch.allclose(grad, grad2, atol=1e-3))
  70. tests/test_look_at.py: assert(np.allclose(transformed.data.squeeze().numpy(), np.array(a)))
  71. tests/test_rasterize_silhouettes.py: assert(np.allclose(ref, image))
  72. tests/test_rasterize_silhouettes.py: assert(torch.allclose(vertices.grad, grad_ref, rtol=1e-2))
  73. tests/test_rasterize_silhouettes.py: assert(torch.allclose(vertices.grad, grad_ref, rtol=1e-2))
  74. tests/test_perspective.py: assert(np.allclose(transformer.data.squeeze().numpy(), v_out))
  75. tests/test_save_obj.py: assert torch.allclose(vertices, vertices2)
  76. tests/test_save_obj.py: assert torch.allclose(faces, faces2)
  77. tests/test_rasterize.py: assert(np.allclose(ref, image))
  78. tests/test_rasterize.py: assert(torch.allclose(vertices.grad, grad_ref, rtol=1e-2))
  79. tests/test_rasterize.py: assert(torch.allclose(vertices.grad, grad_ref, rtol=1e-2))
  80. tests/test_load_obj.py: assert (torch.allclose(torch.from_numpy(vertices_ref).cuda(), vertices))
  81. tests/test_load_obj.py: assert (torch.allclose(torch.from_numpy(faces_ref).cuda(), faces))
  82. tests/test_load_obj.py: assert (torch.allclose(torch.from_numpy(vertices_ref).cuda() * 2 - 1.0, vertices))
  83. tests/test_load_obj.py: assert (torch.allclose(torch.from_numpy(faces_ref).cuda(), faces))
  84. tests/test_load_obj.py: assert (faces.shape[0] == 2464)
  85. tests/test_load_obj.py: assert (vertices.shape[0] == 1292)
  86. README.md:**Note**: In some newer PyTorch versions you might see some compilation errors involving AT_ASSERT. In these cases you can use the version of the code that is in the branch *at_assert_fix*. These changes will be merged into master in the near future.
  87.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement