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.

README.md 1.1 kB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # TensorFlow.NET
  2. TensorFlow.NET provides .NET Standard binding for [TensorFlow](https://www.tensorflow.org/).
  3. [![Join the chat at https://gitter.im/publiclab/publiclab](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Tensorflow-NET)
  4. ![Tensorflow.NET](https://ci.appveyor.com/api/projects/status/tensorflow-net-p7kmsjyo10ey?svg=true)
  5. TensorFlow.NET is a member project of SciSharp stack.
  6. ![tensors_flowing](docs/assets/tensors_flowing.gif)
  7. ### How to use
  8. Download the pre-compiled dll [here](tensorflowlib) and place it in the bin folder.
  9. Import tensorflow.net.
  10. ```cs
  11. using Tensorflow;
  12. ```
  13. Add two constants.
  14. ```cs
  15. // Create a Constant op
  16. var a = tf.constant(4.0f);
  17. var b = tf.constant(5.0f);
  18. var c = tf.add(a, b);
  19. using (var sess = tf.Session())
  20. {
  21. var o = sess.run(c);
  22. }
  23. ```
  24. Feed placeholder.
  25. ```cs
  26. // Create a placeholder op
  27. var a = tf.placeholder(tf.float32);
  28. var b = tf.placeholder(tf.float32);
  29. var c = tf.add(a, b);
  30. using(var sess = tf.Session())
  31. {
  32. var feed_dict = new Dictionary<Tensor, object>();
  33. feed_dict.Add(a, 3.0f);
  34. feed_dict.Add(b, 2.0f);
  35. var o = sess.run(c, feed_dict);
  36. }
  37. ```

tensorflow框架的.NET版本,提供了丰富的特性和API,可以借此很方便地在.NET平台下搭建深度学习训练与推理流程。

Contributors (1)