Home
last modified time | relevance | path

Searched refs:AbstractTensorHandle (Results 1 – 25 of 74) sorted by relevance

123

/external/tensorflow/tensorflow/c/experimental/ops/
Dmath_ops.h23 Status Mul(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs,
24 absl::Span<AbstractTensorHandle*> outputs, const char* name);
27 absl::Span<AbstractTensorHandle* const> inputs,
28 absl::Span<AbstractTensorHandle*> outputs, const char* name);
30 Status Add(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs,
31 absl::Span<AbstractTensorHandle*> outputs, const char* name);
34 absl::Span<AbstractTensorHandle* const> inputs,
35 absl::Span<AbstractTensorHandle*> outputs, const char* name,
38 Status Neg(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs,
39 absl::Span<AbstractTensorHandle*> outputs, const char* name);
[all …]
Darray_ops.h26 absl::Span<AbstractTensorHandle* const> inputs,
27 absl::Span<AbstractTensorHandle*> outputs, const char* name);
30 absl::Span<AbstractTensorHandle* const> inputs,
31 absl::Span<AbstractTensorHandle*> outputs, const char* name);
34 absl::Span<AbstractTensorHandle* const> inputs,
35 absl::Span<AbstractTensorHandle*> outputs, const char* name);
38 absl::Span<AbstractTensorHandle* const> inputs,
39 absl::Span<AbstractTensorHandle*> outputs, const char* name);
42 absl::Span<AbstractTensorHandle* const> inputs,
43 absl::Span<AbstractTensorHandle*> outputs, const char* name);
[all …]
Dmath_ops.cc29 Status Mul(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, in Mul()
30 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in Mul()
41 absl::Span<AbstractTensorHandle* const> inputs, in Conj()
42 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in Conj()
63 Status Add(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, in Add()
64 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in Add()
76 Status Sub(AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, in Sub()
77 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in Sub()
90 absl::Span<AbstractTensorHandle* const> inputs, in MatMul()
91 absl::Span<AbstractTensorHandle*> outputs, const char* name, in MatMul()
[all …]
Dnn_ops.h26 AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs,
27 absl::Span<AbstractTensorHandle*> outputs, const char* name);
30 absl::Span<AbstractTensorHandle* const> inputs,
31 absl::Span<AbstractTensorHandle*> outputs, const char* name);
34 absl::Span<AbstractTensorHandle* const> inputs,
35 absl::Span<AbstractTensorHandle*> outputs, const char* name);
38 absl::Span<AbstractTensorHandle* const> inputs,
39 absl::Span<AbstractTensorHandle*> outputs, const char* name);
42 absl::Span<AbstractTensorHandle* const> inputs,
43 absl::Span<AbstractTensorHandle*> outputs,
Darray_ops.cc26 absl::Span<AbstractTensorHandle* const> inputs, in Identity()
27 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in Identity()
38 absl::Span<AbstractTensorHandle* const> inputs, in IdentityN()
39 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in IdentityN()
50 absl::Span<AbstractTensorHandle* const> inputs, in ZerosLike()
51 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in ZerosLike()
61 absl::Span<AbstractTensorHandle* const> inputs, in Shape()
62 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in Shape()
73 absl::Span<AbstractTensorHandle* const> inputs, in ExpandDims()
74 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in ExpandDims()
[all …]
Dnn_ops.cc28 AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, in SparseSoftmaxCrossEntropyWithLogits()
29 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in SparseSoftmaxCrossEntropyWithLogits()
45 absl::Span<AbstractTensorHandle* const> inputs, in ReluGrad()
46 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in ReluGrad()
60 absl::Span<AbstractTensorHandle* const> inputs, in Relu()
61 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in Relu()
73 absl::Span<AbstractTensorHandle* const> inputs, in BiasAdd()
74 absl::Span<AbstractTensorHandle*> outputs, const char* name) { in BiasAdd()
89 absl::Span<AbstractTensorHandle* const> inputs, in BiasAddGrad()
90 absl::Span<AbstractTensorHandle*> outputs, in BiasAddGrad()
/external/tensorflow/tensorflow/c/eager/
Dmnist_gradients_testutil.cc46 absl::Span<AbstractTensorHandle* const> inputs, in AddGradModel()
47 absl::Span<AbstractTensorHandle*> outputs, in AddGradModel()
52 std::vector<AbstractTensorHandle*> add_outputs(1); in AddGradModel()
70 absl::Span<AbstractTensorHandle* const> inputs, in MatMulGradModel()
71 absl::Span<AbstractTensorHandle*> outputs, in MatMulGradModel()
76 vector<AbstractTensorHandle*> mm_outputs(1); in MatMulGradModel()
95 absl::Span<AbstractTensorHandle* const> inputs, in MNISTForwardModel()
96 absl::Span<AbstractTensorHandle*> outputs, in MNISTForwardModel()
115 AbstractTensorHandle* X = inputs[0]; in MNISTForwardModel()
116 AbstractTensorHandle* W1 = inputs[1]; in MNISTForwardModel()
[all …]
Dgradients.h58 absl::Span<AbstractTensorHandle* const> grad_outputs,
59 absl::Span<AbstractTensorHandle*> grad_inputs) = 0;
68 std::vector<AbstractTensorHandle*> inputs;
69 std::vector<AbstractTensorHandle*> outputs;
110 explicit TapeTensor(AbstractTensorHandle* handle);
117 AbstractTensorHandle* ZerosLike() const;
119 AbstractTensorHandle* GetHandle() const;
122 AbstractTensorHandle* handle_;
129 class Tape : protected eager::GradientTape<AbstractTensorHandle,
132 using GradientTape<AbstractTensorHandle, GradientFunction,
[all …]
Dmnist_gradients_testutil.h40 absl::Span<AbstractTensorHandle* const> inputs,
41 absl::Span<AbstractTensorHandle*> outputs,
48 absl::Span<AbstractTensorHandle* const> inputs,
49 absl::Span<AbstractTensorHandle*> outputs,
54 absl::Span<AbstractTensorHandle* const> inputs,
55 absl::Span<AbstractTensorHandle*> outputs,
60 absl::Span<AbstractTensorHandle* const> inputs,
61 absl::Span<AbstractTensorHandle*> outputs,
66 absl::Span<AbstractTensorHandle* const> inputs,
67 absl::Span<AbstractTensorHandle*> outputs,
[all …]
Dgradients.cc32 int64 ToId(const AbstractTensorHandle* t) { in ToId()
36 Status ZerosLike(AbstractContext* ctx, AbstractTensorHandle* t, in ZerosLike()
37 AbstractTensorHandle** result) { in ZerosLike()
46 std::vector<AbstractTensorHandle*> outputs(num_outputs); in ZerosLike()
48 op->Execute(absl::Span<AbstractTensorHandle*>(outputs), &num_outputs)); in ZerosLike()
76 TapeTensor::TapeTensor(AbstractTensorHandle* handle) : handle_(handle) { in TapeTensor()
90 AbstractTensorHandle* TapeTensor::GetHandle() const { return handle_; } in GetHandle()
92 AbstractTensorHandle* TapeTensor::ZerosLike() const { return nullptr; } in ZerosLike()
95 : public eager::VSpace<AbstractTensorHandle, GradientFunction, TapeTensor> {
101 int64 NumElements(AbstractTensorHandle* tensor) const override;
[all …]
Dgradients_util.h40 AbstractTensorHandle** tensor);
45 AbstractTensorHandle** tensor);
49 int num_dims, AbstractTensorHandle** tensor);
52 Status GetValue(AbstractTensorHandle* t, TF_Tensor** result_tensor);
69 std::vector<AbstractTensorHandle*>& grads,
70 std::vector<AbstractTensorHandle*>& weights,
71 AbstractTensorHandle* learning_rate);
74 AbstractContext*, absl::Span<AbstractTensorHandle* const>,
75 absl::Span<AbstractTensorHandle*>, const GradientRegistry&)>;
80 absl::Span<AbstractTensorHandle* const> inputs,
[all …]
Dunified_api_testutil.h31 absl::Span<AbstractTensorHandle* const> inputs,
32 std::vector<AbstractTensorHandle*>* params);
36 absl::Span<AbstractTensorHandle* const>,
37 absl::Span<AbstractTensorHandle*>)>;
47 absl::Span<AbstractTensorHandle* const> inputs,
48 absl::Span<AbstractTensorHandle*> outputs, bool use_function);
54 AbstractTensorHandle** tensor);
59 AbstractTensorHandle** tensor);
64 AbstractTensorHandle** tensor);
67 Status GetValue(AbstractTensorHandle* t, TF_Tensor** result_tensor);
Dgradient_checker.cc49 absl::Span<AbstractTensorHandle* const> inputs, in RunAndMaybeSum()
50 absl::Span<AbstractTensorHandle*> outputs, in RunAndMaybeSum()
52 std::vector<AbstractTensorHandle*> model_outputs(1); in RunAndMaybeSum()
78 AbstractTensorHandle* sum_dims_raw = nullptr; in RunAndMaybeSum()
92 absl::Span<AbstractTensorHandle* const> inputs, in CalcNumericalGrad()
94 AbstractTensorHandle** numerical_grad) { in CalcNumericalGrad()
95 vector<AbstractTensorHandle*> theta_inputs(inputs.size()); in CalcNumericalGrad()
100 AbstractTensorHandle* theta = in CalcNumericalGrad()
124 std::vector<AbstractTensorHandle*> f_outputs(1); in CalcNumericalGrad()
132 AbstractTensorHandle* two_eps_raw = nullptr; in CalcNumericalGrad()
[all …]
Dgradients_util.cc84 AbstractTensorHandle** tensor) { in ScalarTensorHandle()
100 AbstractTensorHandle** tensor) { in TensorHandleWithDimsFloat()
116 int num_dims, AbstractTensorHandle** tensor) { in TensorHandleWithDimsInt()
130 Status GetValue(AbstractTensorHandle* t, TF_Tensor** result_tensor) { in GetValue()
144 AbstractTensorHandle* a_raw = nullptr; in GetTensorHandleUtilFloat()
155 AbstractTensorHandle* a_raw = nullptr; in GetTensorHandleUtilInt()
166 AbstractTensorHandle* y_raw = nullptr; in GetScalarTensorHandleUtil()
174 Status UpdateWeights(AbstractContext* ctx, vector<AbstractTensorHandle*>& grads, in UpdateWeights()
175 vector<AbstractTensorHandle*>& weights, in UpdateWeights()
176 AbstractTensorHandle* learning_rate) { in UpdateWeights()
[all …]
Dunified_api_testutil.cc38 absl::Span<AbstractTensorHandle* const> inputs, in CreateParamsForInputs()
39 std::vector<AbstractTensorHandle*>* params) { in CreateParamsForInputs()
53 absl::Span<AbstractTensorHandle* const> inputs, in RunModel()
54 absl::Span<AbstractTensorHandle*> outputs, bool use_function) { in RunModel()
65 std::vector<AbstractTensorHandle*> func_inputs; in RunModel()
69 std::vector<AbstractTensorHandle*> model_outputs; in RunModel()
103 std::vector<AbstractTensorHandle*> fn_outputs(retvals); in RunModel()
105 absl::Span<AbstractTensorHandle*>(fn_outputs.data(), fn_outputs.size()), in RunModel()
134 AbstractTensorHandle** tensor) { in TestScalarTensorHandle()
148 AbstractTensorHandle** tensor) { in TestTensorHandleWithDimsFloat()
[all …]
Dgradient_checker_test.cc35 absl::Span<AbstractTensorHandle* const> inputs, int input_index, in CompareNumericalAndManualGradients()
41 AbstractTensorHandle* numerical_grad_raw; in CompareNumericalAndManualGradients()
66 absl::Span<AbstractTensorHandle* const> inputs, in MatMulModel()
67 absl::Span<AbstractTensorHandle*> outputs) { in MatMulModel()
74 absl::Span<AbstractTensorHandle* const> inputs, in MulModel()
75 absl::Span<AbstractTensorHandle*> outputs) { in MulModel()
119 AbstractTensorHandle* A_raw; in TEST_P()
129 AbstractTensorHandle* B_raw; in TEST_P()
145 AbstractTensorHandle* x_raw = nullptr; in TEST_P()
153 AbstractTensorHandle* y_raw = nullptr; in TEST_P()
Dabstract_tensor_handle.h28 class AbstractTensorHandle : public core::RefCounted {
31 explicit AbstractTensorHandle(AbstractTensorHandleKind kind) : kind_(kind) {} in AbstractTensorHandle() function
32 virtual ~AbstractTensorHandle() {} in ~AbstractTensorHandle()
53 void operator()(AbstractTensorHandle* p) const { in operator()
62 std::unique_ptr<AbstractTensorHandle,
Dgradients_test.cc73 absl::Span<AbstractTensorHandle* const> inputs, in IdentityNGradModel()
74 absl::Span<AbstractTensorHandle*> outputs) { in IdentityNGradModel()
82 vector<AbstractTensorHandle*> identity_n_outputs(2); in IdentityNGradModel()
121 AbstractTensorHandle* x_raw = nullptr; in TEST_P()
128 AbstractTensorHandle* x_raw = nullptr; in TEST_P()
138 std::vector<AbstractTensorHandle*> outputs(2); in TEST_P()
169 AbstractTensorHandle* x_raw = nullptr; in TEST_P()
192 std::vector<AbstractTensorHandle*> outputs(1); in TEST_P()
208 AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, in RecordOperationWithNullGradientFunctionModel()
209 absl::Span<AbstractTensorHandle*> outputs) { in RecordOperationWithNullGradientFunctionModel()
[all …]
/external/tensorflow/tensorflow/python/framework/experimental/
Dmath_ops.cc29 using tensorflow::AbstractTensorHandle;
33 m.def("add", [](AbstractContext* ctx, AbstractTensorHandle* a, in PYBIND11_MODULE()
34 AbstractTensorHandle* b, const char* name) { in PYBIND11_MODULE()
36 std::vector<AbstractTensorHandle*> outputs(1); in PYBIND11_MODULE()
44 m.def("mat_mul", [](AbstractContext* ctx, AbstractTensorHandle* a, in PYBIND11_MODULE()
45 AbstractTensorHandle* b, const char* name) { in PYBIND11_MODULE()
47 std::vector<AbstractTensorHandle*> outputs(1); in PYBIND11_MODULE()
57 [](AbstractContext* ctx, AbstractTensorHandle* a, const char* name) { in PYBIND11_MODULE()
59 std::vector<AbstractTensorHandle*> outputs(1); in PYBIND11_MODULE()
67 m.def("sub", [](AbstractContext* ctx, AbstractTensorHandle* a, in PYBIND11_MODULE()
[all …]
Dnn_ops.cc29 using tensorflow::AbstractTensorHandle;
34 [](AbstractContext* ctx, AbstractTensorHandle* a, const char* name) { in PYBIND11_MODULE()
36 std::vector<AbstractTensorHandle*> outputs(1); in PYBIND11_MODULE()
47 [](AbstractContext* ctx, AbstractTensorHandle* features, in PYBIND11_MODULE()
48 AbstractTensorHandle* labels, const char* name) { in PYBIND11_MODULE()
50 std::vector<AbstractTensorHandle*> outputs(2); in PYBIND11_MODULE()
Dunified_api.cc50 using tensorflow::AbstractTensorHandle;
140 return static_cast<AbstractTensorHandle*>(handle); in PYBIND11_MODULE()
160 AbstractTensorHandle* handle = elem_h.cast<AbstractTensorHandle*>(); in PYBIND11_MODULE()
209 [](AbstractOperation* self, AbstractTensorHandle* input) { in PYBIND11_MODULE()
219 std::vector<AbstractTensorHandle*> outputs(num_outputs); in PYBIND11_MODULE()
226 py::class_<AbstractTensorHandle, AbstractTensorHandlePtr>( in PYBIND11_MODULE()
228 .def("DataType", &AbstractTensorHandle::DataType) in PYBIND11_MODULE()
229 .def("numpy", [](AbstractTensorHandle* self) { in PYBIND11_MODULE()
253 auto t = static_cast<AbstractTensorHandle*>(unwrap(eager_tensor)); in PYBIND11_MODULE()
/external/tensorflow/tensorflow/c/experimental/gradients/
Dmath_grad.cc41 absl::Span<AbstractTensorHandle* const> grad_outputs, in Compute()
42 absl::Span<AbstractTensorHandle*> grad_inputs) override { in Compute()
58 explicit ExpGradientFunction(AbstractTensorHandle* exp) : exp_(exp) { in ExpGradientFunction()
62 absl::Span<AbstractTensorHandle* const> grad_outputs, in Compute()
63 absl::Span<AbstractTensorHandle*> grad_inputs) override { in Compute()
64 vector<AbstractTensorHandle*> conj_outputs(1); in Compute()
83 explicit SqrtGradientFunction(AbstractTensorHandle* sqrt) : sqrt_(sqrt) { in SqrtGradientFunction()
87 absl::Span<AbstractTensorHandle* const> grad_outputs, in Compute()
88 absl::Span<AbstractTensorHandle*> grad_inputs) override { in Compute()
102 explicit MatMulGradientFunction(vector<AbstractTensorHandle*> f_inputs, in MatMulGradientFunction()
[all …]
Dnn_grad.cc38 explicit ReluGradientFunction(vector<AbstractTensorHandle*> f_outputs) in ReluGradientFunction()
48 absl::Span<AbstractTensorHandle* const> grad_outputs, in Compute()
49 absl::Span<AbstractTensorHandle*> grad_inputs) override { in Compute()
50 AbstractTensorHandle* upstream_grad = grad_outputs[0]; in Compute()
51 AbstractTensorHandle* activations = forward_outputs_[0]; in Compute()
69 vector<AbstractTensorHandle*> forward_outputs_;
72 Status BroadcastMul(AbstractContext* ctx, AbstractTensorHandle* vec, in BroadcastMul()
73 AbstractTensorHandle* mat, in BroadcastMul()
74 absl::Span<AbstractTensorHandle*> outputs) { in BroadcastMul()
83 vector<AbstractTensorHandle*> expand_dims_outputs(1); in BroadcastMul()
[all …]
Dmath_grad_test.cc35 absl::Span<AbstractTensorHandle* const> inputs, in AddModel()
36 absl::Span<AbstractTensorHandle*> outputs) { in AddModel()
41 absl::Span<AbstractTensorHandle* const> inputs, in ExpModel()
42 absl::Span<AbstractTensorHandle*> outputs) { in ExpModel()
47 absl::Span<AbstractTensorHandle* const> inputs, in SqrtModel()
48 absl::Span<AbstractTensorHandle*> outputs) { in SqrtModel()
53 absl::Span<AbstractTensorHandle* const> inputs, in NegModel()
54 absl::Span<AbstractTensorHandle*> outputs) { in NegModel()
59 absl::Span<AbstractTensorHandle* const> inputs, in SubModel()
60 absl::Span<AbstractTensorHandle*> outputs) { in SubModel()
[all …]
Dnn_grad_test.cc33 absl::Span<AbstractTensorHandle* const> inputs, in ReluModel()
34 absl::Span<AbstractTensorHandle*> outputs) { in ReluModel()
39 absl::Span<AbstractTensorHandle* const> inputs, in ReluGradModel()
40 absl::Span<AbstractTensorHandle*> outputs) { in ReluGradModel()
46 std::vector<AbstractTensorHandle*> temp_outputs(1); in ReluGradModel()
61 AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, in SparseSoftmaxCrossEntropyWithLogitsModel()
62 absl::Span<AbstractTensorHandle*> outputs) { in SparseSoftmaxCrossEntropyWithLogitsModel()
63 std::vector<AbstractTensorHandle*> temp_outputs(2); in SparseSoftmaxCrossEntropyWithLogitsModel()
77 AbstractContext* ctx, absl::Span<AbstractTensorHandle* const> inputs, in SparseSoftmaxCrossEntropyWithLogitsGradModel()
78 absl::Span<AbstractTensorHandle*> outputs) { in SparseSoftmaxCrossEntropyWithLogitsGradModel()
[all …]

123