Home
last modified time | relevance | path

Searched refs:TensorBuffer (Results 1 – 25 of 41) sorted by relevance

12

/external/tflite-support/tensorflow_lite_support/java/src/java/org/tensorflow/lite/support/image/
DTensorBufferContainer.java21 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
26 private final TensorBuffer buffer;
37 static TensorBufferContainer create(TensorBuffer buffer, ColorSpaceType colorSpaceType) { in create()
41 private TensorBufferContainer(TensorBuffer buffer, ColorSpaceType colorSpaceType) { in TensorBufferContainer()
49 return create(TensorBuffer.createFrom(buffer, buffer.getDataType()), colorSpaceType); in clone()
68 public TensorBuffer getTensorBuffer(DataType dataType) { in getTensorBuffer()
73 return buffer.getDataType() == dataType ? buffer : TensorBuffer.createFrom(buffer, dataType); in getTensorBuffer()
DTensorImage.java23 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
148 TensorBuffer buffer = TensorBuffer.createDynamic(getDataType()); in load()
164 TensorBuffer buffer = TensorBuffer.createDynamic(getDataType()); in load()
180 public void load(TensorBuffer buffer) { in load()
194 public void load(TensorBuffer buffer, ColorSpaceType colorSpaceType) { in load()
254 public TensorBuffer getTensorBuffer() { in getTensorBuffer()
DImageConversions.java23 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
40 static Bitmap convertRgbTensorBufferToBitmap(TensorBuffer buffer) { in convertRgbTensorBufferToBitmap()
71 static Bitmap convertGrayscaleTensorBufferToBitmap(TensorBuffer buffer) { in convertGrayscaleTensorBufferToBitmap()
73 TensorBuffer uint8Buffer = in convertGrayscaleTensorBufferToBitmap()
76 : TensorBuffer.createFrom(buffer, DataType.UINT8); in convertGrayscaleTensorBufferToBitmap()
107 static void convertBitmapToTensorBuffer(Bitmap bitmap, TensorBuffer buffer) { in convertBitmapToTensorBuffer()
DBitmapContainer.java24 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
60 public TensorBuffer getTensorBuffer(DataType dataType) { in getTensorBuffer()
61 TensorBuffer buffer = TensorBuffer.createDynamic(dataType); in getTensorBuffer()
DColorSpaceType.java23 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
34 Bitmap convertTensorBufferToBitmap(TensorBuffer buffer) { in convertTensorBufferToBitmap()
76 Bitmap convertTensorBufferToBitmap(TensorBuffer buffer) { in convertTensorBufferToBitmap()
155 abstract Bitmap convertTensorBufferToBitmap(TensorBuffer buffer); in convertTensorBufferToBitmap()
DImageContainer.java20 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
51 TensorBuffer getTensorBuffer(DataType dataType); in getTensorBuffer()
/external/tflite-support/tensorflow_lite_support/java/src/java/org/tensorflow/lite/support/label/
DTensorLabel.java28 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
60 private final TensorBuffer tensorBuffer;
76 @NonNull Map<Integer, List<String>> axisLabels, @NonNull TensorBuffer tensorBuffer) { in TensorLabel()
104 public TensorLabel(@NonNull List<String> axisLabels, @NonNull TensorBuffer tensorBuffer) { in TensorLabel()
113 public Map<String, TensorBuffer> getMapWithTensorBuffer() { in getMapWithTensorBuffer()
116 Map<String, TensorBuffer> labelToTensorMap = new LinkedHashMap<>(); in getMapWithTensorBuffer()
141 TensorBuffer labelBuffer = TensorBuffer.createDynamic(dataType); in getMapWithTensorBuffer()
207 private static int getFirstAxisWithSizeGreaterThanOne(@NonNull TensorBuffer tensorBuffer) { in getFirstAxisWithSizeGreaterThanOne()
DLabelUtil.java24 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
45 @NonNull TensorBuffer tensorBuffer, @NonNull List<String> labels, int offset) { in mapValueToLabels()
/external/tflite-support/tensorflow_lite_support/java/src/java/org/tensorflow/lite/support/common/
DTensorOperator.java18 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
23 public interface TensorOperator extends Operator<TensorBuffer> {
26 TensorBuffer apply(TensorBuffer input); in apply()
DTensorProcessor.java18 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
34 public class TensorProcessor extends SequentialProcessor<TensorBuffer> {
40 public static class Builder extends SequentialProcessor.Builder<TensorBuffer> {
/external/tflite-support/tensorflow_lite_support/java/src/java/org/tensorflow/lite/support/tensorbuffer/
DTensorBuffer.java29 public abstract class TensorBuffer { class
75 public static TensorBuffer createFixedSize(@NonNull int[] shape, DataType dataType) { in createFixedSize()
96 public static TensorBuffer createDynamic(DataType dataType) { in createDynamic()
115 public static TensorBuffer createFrom(@NonNull TensorBuffer buffer, DataType dataType) { in createFrom()
117 TensorBuffer result; in createFrom()
337 protected TensorBuffer(@NonNull int[] shape) { in TensorBuffer() method in TensorBuffer
343 protected TensorBuffer() { in TensorBuffer() method in TensorBuffer
/external/tensorflow/tensorflow/core/kernels/mlir_generated/
Dbase_op.cc26 class MlirTensorBuffer : public TensorBuffer {
29 : TensorBuffer(const_cast<void*>(ptr)), in MlirTensorBuffer()
41 TensorBuffer* root_buffer() override { return this; } in root_buffer()
54 TensorBuffer* GetMlirTensorBuffer(const void* ptr, size_t size, in GetMlirTensorBuffer()
/external/tflite-support/tensorflow_lite_support/java/src/java/org/tensorflow/lite/support/common/ops/
DCastOp.java21 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
49 public TensorBuffer apply(TensorBuffer input) { in apply()
53 return TensorBuffer.createFrom(input, destinationType); in apply()
DNormalizeOp.java22 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
136 public TensorBuffer apply(@NonNull TensorBuffer input) { in apply()
151 TensorBuffer output; in apply()
/external/tensorflow/tensorflow/c/
Dtf_tensor_internal.h38 class TF_ManagedBuffer : public tensorflow::TensorBuffer {
43 : TensorBuffer(data), in TF_ManagedBuffer()
54 TensorBuffer* root_buffer() override { return this; } in root_buffer()
75 static TensorBuffer* Buffer(const Tensor& tensor) { return tensor.buf_; } in Buffer()
77 TensorBuffer* buf) { in MakeTensor()
/external/tflite-support/tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision/segmenter/
DOutputType.java27 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
71 TensorBuffer tensorBuffer = TensorBuffer.createDynamic(UINT8); in createMasksFromBuffer()
114 TensorBuffer tensorBuffer = TensorBuffer.createDynamic(FLOAT32); in createMasksFromBuffer()
/external/tensorflow/tensorflow/core/kernels/
Dtensor_cord.cc49 TensorBuffer* TensorCord::TensorBufWithRef(Tensor* tensor) { in TensorBufWithRef()
50 TensorBuffer* buf = tensor->buf_; in TensorBufWithRef()
56 static_cast<TensorBuffer*>(tensor_buffer)->Unref(); in TensorBufReleaser()
Dscoped_allocator_ops.cc127 const TensorBuffer* backing_buf = DMAHelper::buffer(&output); in Compute()
133 const TensorBuffer* input_buf = DMAHelper::buffer(&context->input(i)); in Compute()
192 const TensorBuffer* backing_buf = DMAHelper::buffer(&backing_copy); in Compute()
207 const TensorBuffer* input_buf = DMAHelper::buffer(&copy); in Compute()
/external/tensorflow/tensorflow/lite/delegates/flex/
Dbuffer_map.cc29 class BaseTfLiteTensorBuffer : public tensorflow::TensorBuffer {
30 using tensorflow::TensorBuffer::TensorBuffer;
32 TensorBuffer* root_buffer() override { return this; } in root_buffer()
/external/tensorflow/tensorflow/core/common_runtime/
Ddma_helper.h29 static TensorBuffer* buffer(Tensor* t) { return t->buf_; } in buffer()
30 static const TensorBuffer* buffer(const Tensor* t) { return t->buf_; } in buffer()
/external/tensorflow/tensorflow/compiler/jit/
Dxla_launch_util.h191 class XlaTensorBuffer : public TensorBuffer {
195 : TensorBuffer(const_cast<void*>(ptr)), in XlaTensorBuffer()
208 TensorBuffer* root_buffer() override { return this; } in root_buffer()
/external/tensorflow/tensorflow/lite/g3doc/inference_with_metadata/
Dlite_support.md88 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
92 TensorBuffer probabilityBuffer =
93 TensorBuffer.createFixedSize(new int[]{1, 1001}, DataType.UINT8);
218 When initiating input or output objects such as `TensorImage` or `TensorBuffer`
223 TensorBuffer probabilityBuffer =
224 TensorBuffer.createFixedSize(new int[]{1, 1001}, DataType.UINT8);
228 tensors. For example, when processing a quantized output `TensorBuffer`, the
238 TensorBuffer dequantizedBuffer = probabilityProcessor.process(probabilityBuffer);
/external/tflite-support/tensorflow_lite_support/java/src/java/org/tensorflow/lite/support/image/ops/
DTensorOperatorWrapper.java24 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
53 TensorBuffer resBuffer = tensorOp.apply(image.getTensorBuffer()); in apply()
/external/tensorflow/tensorflow/core/framework/
Dtensor.h45 class TensorBuffer; variable
63 class TensorBuffer : public core::RefCounted {
65 explicit TensorBuffer(void* data_ptr) : data_(data_ptr) {} in TensorBuffer() function
66 ~TensorBuffer() override {} in ~TensorBuffer()
80 virtual TensorBuffer* root_buffer() = 0;
158 Tensor(DataType type, const TensorShape& shape, TensorBuffer* buf);
164 core::RefCountPtr<TensorBuffer> buf);
670 TensorBuffer* buf_;
957 class Tensor::HostScalarTensorBufferBase : public TensorBuffer {
959 using TensorBuffer::TensorBuffer;
[all …]
/external/tflite-support/tensorflow_lite_support/java/src/java/org/tensorflow/lite/support/label/ops/
DLabelAxisOp.java27 import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
43 public TensorLabel apply(@NonNull TensorBuffer buffer) { in apply()

12