forked from SciSharp/TensorFlow.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIEagerRunner.cs
More file actions
53 lines (42 loc) · 1.53 KB
/
IEagerRunner.cs
File metadata and controls
53 lines (42 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using Tensorflow.Contexts;
using Tensorflow.Gradients;
using static Tensorflow.tensorflow;
namespace Tensorflow.Eager
{
public interface IEagerRunner
{
Tensor[] Execute(Context ctx, string op_name,
int num_outputs,
Tensor[] inputs,
object[] attrs,
string name = null);
(TF_DataType, Tensor[]) ArgsToMatchingEager(Context ctx,
TF_DataType default_dtype = TF_DataType.DtInvalid,
object[] args = null);
Tensor[] TFE_FastPathExecute(FastPathOpExecInfo op_exec_info);
Tensor[] TFE_Execute(Context ctx,
string device_name,
string op_name,
Tensor[] inputs,
object[] attrs,
int num_outputs);
Tensor[] TFE_TapeGradient(ITape tape,
Tensor[] target,
Tensor[] sources,
List<Tensor> output_gradients,
Tensor[] sources_raw,
string unconnected_gradients);
void TFE_TapeSetRecordOperation(string op_type, Tensor[] output_tensors,
Tensor[] input_tensors, BackwardFunction backward_function);
int TFE_TapeSetPossibleGradientTypes(Tensor[] tensors);
bool RecordGradient(string op_name,
Tensor[] inputs,
object[] attrs,
Tensor[] results,
BackwardFunction getBackwardFunction = null);
bool MustRecordGradient();
int TapeSetPossibleGradientTypes(params Tensor[] args);
void ClearEagerOperationMap();
}
}