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 875 B

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

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