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.

ExamplesTest.cs 2.7 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Microsoft.VisualStudio.TestTools.UnitTesting;
  5. using TensorFlowNET.Examples;
  6. using TensorFlowNET.Examples.CnnTextClassification;
  7. namespace TensorFlowNET.UnitTest.ExamplesTests
  8. {
  9. [TestClass]
  10. public class ExamplesTest
  11. {
  12. [TestMethod]
  13. public void BasicOperations()
  14. {
  15. new BasicOperations() { Enabled = true }.Run();
  16. }
  17. [TestMethod]
  18. public void HelloWorld()
  19. {
  20. new HelloWorld() { Enabled = true }.Run();
  21. }
  22. [TestMethod]
  23. public void ImageRecognition()
  24. {
  25. new HelloWorld() { Enabled = true }.Run();
  26. }
  27. [Ignore]
  28. [TestMethod]
  29. public void InceptionArchGoogLeNet()
  30. {
  31. new InceptionArchGoogLeNet() { Enabled = true }.Run();
  32. }
  33. [Ignore]
  34. [TestMethod]
  35. public void KMeansClustering()
  36. {
  37. new KMeansClustering() { Enabled = true, train_size = 500, validation_size = 100, test_size = 100, batch_size =100 }.Run();
  38. }
  39. [TestMethod]
  40. public void LinearRegression()
  41. {
  42. new LinearRegression() { Enabled = true }.Run();
  43. }
  44. [TestMethod]
  45. public void LogisticRegression()
  46. {
  47. new LogisticRegression() { Enabled = true, training_epochs=10, train_size = 500, validation_size = 100, test_size = 100 }.Run();
  48. }
  49. [Ignore]
  50. [TestMethod]
  51. public void MetaGraph()
  52. {
  53. new MetaGraph() { Enabled = true }.Run();
  54. }
  55. [Ignore]
  56. [TestMethod]
  57. public void NaiveBayesClassifier()
  58. {
  59. new NaiveBayesClassifier() { Enabled = true }.Run();
  60. }
  61. [Ignore]
  62. [TestMethod]
  63. public void NamedEntityRecognition()
  64. {
  65. new NamedEntityRecognition() { Enabled = true }.Run();
  66. }
  67. [TestMethod]
  68. public void NearestNeighbor()
  69. {
  70. new NearestNeighbor() { Enabled = true, TrainSize = 500, ValidationSize = 100, TestSize = 100 }.Run();
  71. }
  72. [Ignore]
  73. [TestMethod]
  74. public void TextClassificationTrain()
  75. {
  76. new TextClassificationTrain() { Enabled = true, DataLimit=100 }.Run();
  77. }
  78. [Ignore]
  79. [TestMethod]
  80. public void TextClassificationWithMovieReviews()
  81. {
  82. new TextClassificationWithMovieReviews() { Enabled = true }.Run();
  83. }
  84. }
  85. }

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