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.

CRF.cs 851 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Tensorflow;
  5. namespace TensorFlowNET.Examples
  6. {
  7. /// <summary>
  8. /// The CRF module implements a linear-chain CRF layer for learning to predict tag sequences.
  9. /// This variant of the CRF is factored into unary potentials for every element
  10. /// in the sequence and binary potentials for every transition between output tags.
  11. ///
  12. /// tensorflow\contrib\crf\python\ops\crf.py
  13. /// </summary>
  14. public class CRF : Python, IExample
  15. {
  16. public int Priority => 13;
  17. public bool Enabled { get; set; } = true;
  18. public bool ImportGraph { get; set; } = false;
  19. public string Name => "CRF";
  20. public bool Run()
  21. {
  22. return true;
  23. }
  24. public void PrepareData()
  25. {
  26. }
  27. }
  28. }

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