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.

IEagerRunner.cs 1.3 kB

4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using Tensorflow.Contexts;
  3. using Tensorflow.Gradients;
  4. using static Tensorflow.tensorflow;
  5. namespace Tensorflow.Eager
  6. {
  7. public interface IEagerRunner
  8. {
  9. Tensor[] Execute(Context ctx, string op_name,
  10. int num_outputs,
  11. Tensor[] inputs,
  12. object[] attrs,
  13. string name = null);
  14. (TF_DataType, Tensor[]) ArgsToMatchingEager(Context ctx,
  15. TF_DataType default_dtype = TF_DataType.DtInvalid,
  16. object[] args = null);
  17. Tensor[] TFE_FastPathExecute(FastPathOpExecInfo op_exec_info);
  18. Tensor[] TFE_Execute(Context ctx,
  19. string device_name,
  20. string op_name,
  21. Tensor[] inputs,
  22. object[] attrs,
  23. int num_outputs);
  24. Tensor[] TFE_TapeGradient(ITape tape,
  25. Tensor[] target,
  26. Tensor[] sources,
  27. Tensor[] output_gradients);
  28. bool RecordGradient(string op_name,
  29. Tensor[] inputs,
  30. object[] attrs,
  31. Tensor[] results,
  32. BackwardFunction getBackwardFunction = null);
  33. bool MustRecordGradient();
  34. int TapeSetPossibleGradientTypes(params Tensor[] args);
  35. void ClearEagerOperationMap();
  36. }
  37. }