Guest User

Untitled

a guest
Jun 22nd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. using PyCall
  2. using TensorFlow
  3.  
  4. macro tryshow(ex)
  5. quote
  6. try
  7. @show $(esc(ex))
  8. catch err
  9. println("Trying to evaluate ",
  10. $(Meta.quot(ex)),
  11. " but got error: ",
  12. err
  13. )
  14. end
  15. nothing
  16. end
  17. end
  18.  
  19. function tf_versioninfo()
  20. println("Please copy-paste all this info into any bug reports.")
  21. println("Note that this may display some errors. But not all errors are bad. Some are expected")
  22.  
  23. println()
  24. println("----------------")
  25. println("Library Versions")
  26. println("----------------")
  27. @tryshow ENV["TF_USE_GPU"]
  28. @tryshow ENV["LIBTENSORFLOW"]
  29. println()
  30. @tryshow tf_version(kind=:backend)
  31. @tryshow tf_version(kind=:python)
  32. @tryshow tf_version(kind=:julia)
  33.  
  34.  
  35. println()
  36. println("-------------")
  37. println("Python Status")
  38. println("-------------")
  39. @tryshow PyCall.conda
  40. @tryshow ENV["PYTHON"]
  41. @tryshow PyCall.PYTHONHOME
  42. @tryshow readstring(`pip --version`)
  43. @tryshow readstring(`pip3 --version`)
  44.  
  45. println()
  46. println("------------")
  47. println("Julia Status")
  48. println("------------")
  49. versioninfo()
  50. end
  51.  
  52. tf_versioninfo()
Add Comment
Please, Sign In to add comment