有什么方法可以手动运行Tensorflow单元测试吗?我想在修改TF源代码时执行健全性检查。
我看到有许多_test.py文件,它们具有执行许多测试操作的类,但我不知道如何运行它们。应该有一个简单的方法吗?
假设您已从Git下载源代码,那么运行TensorFlow单元测试的最简单方法是使用Bazel :
# All tests (for C++ changes).
$ bazel test //tensorflow/...
# All Python tests (for Python front-end changes).
$ bazel test //tensorflow/python/...
# All tests (with GPU support).
$ bazel test -c opt --config=cuda //tensorflow/...
$ bazel test -c opt --config=cuda //tensorflow/python/...
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句