You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

GraphModeTestBase.cs 534 B

1234567891011121314151617181920212223
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using TensorFlowNET.UnitTest;
  3. using static Tensorflow.Binding;
  4. using static Tensorflow.KerasApi;
  5. namespace Tensorflow.UnitTest
  6. {
  7. public class GraphModeTestBase : PythonTest
  8. {
  9. [TestInitialize]
  10. public void TestInit()
  11. {
  12. tf.compat.v1.disable_eager_execution();
  13. }
  14. [TestCleanup]
  15. public void TestClean()
  16. {
  17. keras.backend.clear_session();
  18. tf.enable_eager_execution();
  19. }
  20. }
  21. }