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.

ContextOptions.cs 524 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Tensorflow.Eager
  5. {
  6. public class ContextOptions : IDisposable
  7. {
  8. private IntPtr _handle;
  9. public ContextOptions()
  10. {
  11. _handle = c_api.TFE_NewContextOptions();
  12. }
  13. public void Dispose()
  14. {
  15. c_api.TFE_DeleteContextOptions(_handle);
  16. }
  17. public static implicit operator IntPtr(ContextOptions opts)
  18. {
  19. return opts._handle;
  20. }
  21. }
  22. }

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