Home
last modified time | relevance | path

Searched refs:TF_Tensor (Results 1 – 25 of 35) sorted by relevance

12

/external/tensorflow/tensorflow/c/
Dc_test_util.h31 typedef std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)>
34 TF_Tensor* BoolTensor(int32_t v);
37 TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values);
40 TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims,
44 TF_Tensor* Int32Tensor(const std::vector<int32_t>& values);
46 TF_Tensor* Int32Tensor(int32_t v);
48 TF_Tensor* DoubleTensor(double v);
50 TF_Tensor* FloatTensor(float v);
57 TF_Operation* Const(TF_Tensor* t, TF_Graph* graph, TF_Status* s,
140 void SetInputs(std::vector<std::pair<TF_Operation*, TF_Tensor*>> inputs);
[all …]
Dc_api.h222 typedef struct TF_Tensor TF_Tensor; typedef
234 TF_CAPI_EXPORT extern TF_Tensor* TF_NewTensor(
248 TF_CAPI_EXPORT extern TF_Tensor* TF_AllocateTensor(TF_DataType,
254 TF_CAPI_EXPORT extern TF_Tensor* TF_TensorMaybeMove(TF_Tensor* tensor);
257 TF_CAPI_EXPORT extern void TF_DeleteTensor(TF_Tensor*);
260 TF_CAPI_EXPORT extern TF_DataType TF_TensorType(const TF_Tensor*);
263 TF_CAPI_EXPORT extern int TF_NumDims(const TF_Tensor*);
267 TF_CAPI_EXPORT extern int64_t TF_Dim(const TF_Tensor* tensor, int dim_index);
270 TF_CAPI_EXPORT extern size_t TF_TensorByteSize(const TF_Tensor*);
273 TF_CAPI_EXPORT extern void* TF_TensorData(const TF_Tensor*);
[all …]
Dc_test_util.cc45 TF_Tensor* BoolTensor(bool v) { in BoolTensor()
53 TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values) { in Int8Tensor()
58 TF_Tensor* t = in Int8Tensor()
64 TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims, in Int32Tensor()
70 TF_Tensor* t = in Int32Tensor()
76 TF_Tensor* Int32Tensor(const std::vector<int32_t>& values) { in Int32Tensor()
81 TF_Tensor* Int32Tensor(int32_t v) { in Int32Tensor()
89 TF_Tensor* DoubleTensor(double v) { in DoubleTensor()
97 TF_Tensor* FloatTensor(float v) { in FloatTensor()
128 void ConstHelper(TF_Tensor* t, TF_Graph* graph, TF_Status* s, const char* name, in ConstHelper()
[all …]
Dc_api_internal.h57 struct TF_Tensor { struct
58 ~TF_Tensor();
206 Status TF_TensorToTensor(const TF_Tensor* src, Tensor* dst);
208 TF_Tensor* TF_TensorFromTensor(const Tensor& src, TF_Status* status);
Dc_api.cc195 TF_Tensor::~TF_Tensor() { buffer->Unref(); } in ~TF_Tensor()
197 TF_Tensor* TF_AllocateTensor(TF_DataType dtype, const int64_t* dims, in TF_AllocateTensor()
204 TF_Tensor* TF_NewTensor(TF_DataType dtype, const int64_t* dims, int num_dims, in TF_NewTensor()
234 TF_Tensor* ret = new TF_Tensor{dtype, TensorShape(dimvec), buf}; in TF_NewTensor()
243 TF_Tensor* TF_TensorMaybeMove(TF_Tensor* tensor) { in TF_TensorMaybeMove()
255 void TF_DeleteTensor(TF_Tensor* t) { delete t; } in TF_DeleteTensor()
257 TF_DataType TF_TensorType(const TF_Tensor* t) { return t->dtype; } in TF_TensorType()
258 int TF_NumDims(const TF_Tensor* t) { return t->shape.dims(); } in TF_NumDims()
259 int64_t TF_Dim(const TF_Tensor* t, int dim_index) { in TF_Dim()
262 size_t TF_TensorByteSize(const TF_Tensor* t) { return t->buffer->size(); } in TF_TensorByteSize()
[all …]
Dc_api_test.cc53 TF_Tensor* TF_TensorFromTensor(const Tensor& src, TF_Status* status);
54 Status TF_TensorToTensor(const TF_Tensor* src, Tensor* dst);
133 TF_Tensor* t = TF_NewTensor(TF_FLOAT, dims, 2, values, num_bytes, in TEST()
152 TF_Tensor* t = in TEST()
160 TF_Tensor* t = TF_AllocateTensor(TF_FLOAT, dims, 2, num_bytes); in TEST()
177 TF_Tensor* t = TF_NewTensor(TF_FLOAT, dims, 2, values, num_bytes, in TEST()
180 TF_Tensor* o = TF_TensorMaybeMove(t); in TEST()
238 TF_Tensor* dst = TF_TensorFromTensor(src, status); in TestEncodeDecode()
965 TF_Tensor* out = csession.output_tensor(0); in TEST()
1026 TF_Tensor* out = csession.output_tensor(0); in RunMinTest()
[all …]
Dkernels.h104 TF_Tensor** tensor, TF_Status* status);
111 const TF_Tensor* tensor,
Dkernels.cc133 void TF_GetInput(TF_OpKernelContext* ctx, int i, TF_Tensor** tensor, in TF_GetInput()
141 TF_Tensor* result = ::tensorflow::TF_TensorFromTensor(cc_tensor, status); in TF_GetInput()
147 void TF_SetOutput(TF_OpKernelContext* ctx, int i, const TF_Tensor* tensor, in TF_SetOutput()
Dc_api_experimental_test.cc46 TF_Tensor* out = csession.output_tensor(0); in TestFakeIteratorStack()
94 TF_Tensor* image = csession.output_tensor(0); in TEST()
108 TF_Tensor* label = csession.output_tensor(1); in TEST()
199 TF_Tensor* t = TFE_TensorHandleResolve(retvals[0], status); in TEST()
279 TF_Tensor* t = TFE_TensorHandleResolve(recv_retvals[0], status); in TEST()
Dc_api_experimental.h125 TF_CAPI_EXPORT extern TF_Tensor* TF_DequeueNamedTensor(TF_Session* session,
142 TF_Tensor* tensor,
Dc_test.c41 TF_Tensor* input; in compute()
Dc_api_function_test.cc80 void Run(const std::vector<std::pair<TF_Operation*, TF_Tensor*>>& inputs, in Run()
88 void RunT(const std::vector<std::pair<TF_Operation*, TF_Tensor*>>& inputs, in RunT()
103 TF_Tensor* out = csession.output_tensor(i); in RunT()
113 void Run(const std::vector<std::pair<TF_Operation*, TF_Tensor*>>& inputs, in Run()
126 TF_Tensor* out = csession.output_tensor(i); in Run()
136 void CompareInt32Tensor(const std::vector<int32_t>& expected, TF_Tensor* t) { in CompareInt32Tensor()
884 TF_Tensor* tensor_123 = Int32Tensor({1, 2, 3}); in TEST_F()
1561 TF_Tensor* tensor_shape = Int32Tensor({37, 1}); in DefineStatefulFunction()
1715 TF_Tensor* out = csession.output_tensor(0); in TEST_F()
/external/tensorflow/tensorflow/c/eager/
Dc_api_test_util.cc26 TF_Tensor* t = TF_AllocateTensor(TF_FLOAT, nullptr, 0, sizeof(float)); in TestScalarTensorHandle()
38 TF_Tensor* t = TF_AllocateTensor(TF_INT32, nullptr, 0, sizeof(int)); in TestScalarTensorHandle()
50 TF_Tensor* t = TF_AllocateTensor(TF_BOOL, nullptr, 0, sizeof(bool)); in TestScalarTensorHandle()
63 TF_Tensor* t = TF_AllocateTensor( in DoubleTestMatrixTensorHandle()
77 TF_Tensor* t = TF_AllocateTensor( in TestMatrixTensorHandle()
91 TF_Tensor* t = TF_AllocateTensor( in DoubleTestMatrixTensorHandle3X2()
105 TF_Tensor* t = TF_AllocateTensor( in TestMatrixTensorHandle3X2()
147 TF_Tensor* t = TF_AllocateTensor( in TestAxisTensorHandle()
Dc_api_test.cc179 TF_Tensor* t = TFE_TensorHandleResolve(retvals[0], status); in TestRemoteExecute()
265 TF_Tensor* t = TFE_TensorHandleResolve(retval_task0, status); in TestRemoteExecuteSilentCopies()
304 TF_Tensor* t = TFE_TensorHandleResolve(handle, status.get()); in CheckTFE_TensorHandleHasFloats()
447 TF_Tensor* t = TFE_TensorHandleResolve(h, status.get()); in TEST()
469 TF_Tensor* t = TFE_TensorHandleResolve(hcpu, status.get()); in TensorHandleCopyBetweenDevices()
509 TF_Tensor* tcopy = TFE_TensorHandleResolve(hcopy, status.get()); in TensorHandleCopyBetweenDevices()
583 TF_Tensor* t = TFE_TensorHandleResolve(hcpu, status.get()); in TensorHandleCopyBetweenTwoGPUDevices()
630 TF_Tensor* tcopy = TFE_TensorHandleResolve(hcopy, status.get()); in TensorHandleCopyBetweenTwoGPUDevices()
663 TF_Tensor* t = TFE_TensorHandleResolve(hcpu, status.get()); in TensorHandleSilentCopy()
709 TF_Tensor* t = TFE_TensorHandleResolve(hcpu, status.get()); in TensorHandleSilentCopyLocal()
[all …]
Dc_api.h159 TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandle(TF_Tensor* t,
199 TF_CAPI_EXPORT extern TF_Tensor* TFE_TensorHandleResolve(TFE_TensorHandle* h,
338 TF_Tensor* tensor,
/external/tensorflow/tensorflow/java/src/main/native/
Dtensor_jni.cc29 TF_Tensor* requireHandle(JNIEnv* env, jlong handle) { in requireHandle()
35 return reinterpret_cast<TF_Tensor*>(handle); in requireHandle()
240 StringTensorWriter(TF_Tensor* t, int num_elements) in StringTensorWriter()
272 StringTensorReader(const TF_Tensor* t, int num_elements) in StringTensorReader()
351 TF_Tensor* t = TF_AllocateTensor(static_cast<TF_DataType>(dtype), dims_copy, in Java_org_tensorflow_Tensor_allocate()
371 TF_Tensor* t = TF_AllocateTensor(TF_STRING, nullptr, 0, 8 + dst_len); in Java_org_tensorflow_Tensor_allocateScalarBytes()
454 TF_Tensor* t = TF_AllocateTensor(TF_STRING, dims, num_dims, in Java_org_tensorflow_Tensor_allocateNonScalarBytes()
480 TF_DeleteTensor(reinterpret_cast<TF_Tensor*>(handle)); in Java_org_tensorflow_Tensor_delete()
486 TF_Tensor* t = requireHandle(env, handle); in Java_org_tensorflow_Tensor_buffer()
499 TF_Tensor* t = requireHandle(env, handle); in Java_org_tensorflow_Tensor_dtype()
[all …]
Dsession_jni.cc146 std::unique_ptr<TF_Tensor* []> input_values(new TF_Tensor*[ninputs]); in Java_org_tensorflow_Session_run()
148 std::unique_ptr<TF_Tensor* []> output_values(new TF_Tensor*[noutputs]); in Java_org_tensorflow_Session_run()
Doperation_builder_jni.cc44 TF_Tensor* requireTensor(JNIEnv* env, jlong handle) { in requireTensor()
50 return reinterpret_cast<TF_Tensor*>(handle); in requireTensor()
211 TF_Tensor* t = requireTensor(env, tensor_handle); in Java_org_tensorflow_OperationBuilder_setAttrTensor()
227 std::unique_ptr<TF_Tensor* []> tensors(new TF_Tensor*[n]); in Java_org_tensorflow_OperationBuilder_setAttrTensorList()
/external/tensorflow/tensorflow/python/lib/core/
Dsafe_ptr.h34 void operator()(TF_Tensor* p) const { TF_DeleteTensor(p); } in operator()
54 using Safe_TF_TensorPtr = std::unique_ptr<TF_Tensor, detail::TFTensorDeleter>;
55 Safe_TF_TensorPtr make_safe(TF_Tensor* tensor);
Dndarray_tensor.cc220 Status CopyTF_TensorStringsToPyArray(const TF_Tensor* src, uint64 nelems, in CopyTF_TensorStringsToPyArray()
273 const TF_Tensor* tensor, tensorflow::int64* nelems) { in GetPyArrayDimensionsForTensor()
293 Status GetPyArrayDescrForTensor(const TF_Tensor* tensor, in GetPyArrayDescrForTensor()
373 TF_Tensor* original = tensor.get(); in TF_TensorToPyArray()
374 TF_Tensor* moved = TF_TensorMaybeMove(tensor.release()); in TF_TensorToPyArray()
466 Status TF_TensorToTensor(const TF_Tensor* src, Tensor* dst);
467 TF_Tensor* TF_TensorFromTensor(const tensorflow::Tensor& src,
471 Safe_TF_TensorPtr tf_tensor = make_safe(static_cast<TF_Tensor*>(nullptr)); in NdarrayToTensor()
Dsafe_ptr.cc24 Safe_TF_TensorPtr make_safe(TF_Tensor* tensor) { in make_safe()
/external/tensorflow/tensorflow/go/
Dsession.go356 feedTensors []*C.TF_Tensor
358 fetchTensors []*C.TF_Tensor
365 fetchTensors: make([]*C.TF_Tensor, len(fetches)),
396 func ptrTensor(l []*C.TF_Tensor) **C.TF_Tensor { argument
Dattrs.go141 list := make([]*C.TF_Tensor, meta.list_size)
220 var v *C.TF_Tensor
/external/tensorflow/tensorflow/c/kernels/
Dbitcast_op.cc93 TF_Tensor* tensor; in BitcastOp_Compute()
120 TF_Tensor* output = TF_AllocateTensor(k->output_data_type, dims, 0, in BitcastOp_Compute()
/external/tensorflow/tensorflow/python/client/
Dtf_session_helper.cc91 inputs_safe.emplace_back(make_safe(static_cast<TF_Tensor*>(nullptr))); in TF_Run_wrapper_helper()
389 input_vals_safe.emplace_back(make_safe(static_cast<TF_Tensor*>(nullptr))); in TF_SessionRun_wrapper_helper()
420 for (TF_Tensor* output : output_vals) { in TF_SessionRun_wrapper_helper()
672 TF_Tensor* result_tensor; in TF_TryEvaluateConstant_wrapper()

12