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.

IExample.cs 1.8 kB

6 years ago
6 years ago
6 years ago
6 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*****************************************************************************
  2. Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ******************************************************************************/
  13. using System;
  14. using System.Collections.Generic;
  15. using System.Text;
  16. using Tensorflow;
  17. namespace TensorFlowNET.Examples
  18. {
  19. /// <summary>
  20. /// Interface of Example project
  21. /// All example should implement IExample so the entry program will find it.
  22. /// </summary>
  23. public interface IExample
  24. {
  25. /// <summary>
  26. /// True to run example
  27. /// </summary>
  28. bool Enabled { get; set; }
  29. /// <summary>
  30. /// Set true to import the computation graph instead of building it.
  31. /// </summary>
  32. bool IsImportingGraph { get; set; }
  33. string Name { get; }
  34. bool Run();
  35. /// <summary>
  36. /// Build dataflow graph, train and predict
  37. /// </summary>
  38. /// <returns></returns>
  39. void Train(Session sess);
  40. void Test(Session sess);
  41. void Predict(Session sess);
  42. Graph ImportGraph();
  43. Graph BuildGraph();
  44. /// <summary>
  45. /// Prepare dataset
  46. /// </summary>
  47. void PrepareData();
  48. }
  49. }