using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Text; using Tensorflow; namespace TensorFlowNET.UnitTest { [TestClass] public class PlaceholderTest { [TestMethod] public void placeholder() { var x = tf.placeholder(tf.int32); var y = x * 3; Python.with(tf.Session(), sess => { var result = sess.run(y, feed_dict: new FeedItem[] { new FeedItem(x, 2) }); Assert.AreEqual((int)result, 6); }); } } }