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.

ShapeTestCase.cs 680 B

123456789101112131415161718192021222324
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Tensorflow;
  3. namespace TensorFlowNET.UnitTest.control_flow_ops_test
  4. {
  5. /// <summary>
  6. /// excerpt of tensorflow/python/framework/ops/control_flow_ops_test.py
  7. /// </summary>
  8. [Ignore]
  9. [TestClass]
  10. public class ShapeTestCase : PythonTest
  11. {
  12. [TestMethod]
  13. public void testShape()
  14. {
  15. var tensor = constant_op.constant(new[]{1.0, 2.0});
  16. self.assertEquals(new int[] {2}, tensor.shape);
  17. self.assertEquals(new int[] {2},
  18. control_flow_ops.with_dependencies(new[] {constant_op.constant(1.0).op}, tensor).shape);
  19. }
  20. }
  21. }