@Namespace(value="tflite") @Properties(inherit=tensorflowlite.class) public class InterpreterOptions extends Pointer
Interpreter
.
WARNING: This is an experimental API and subject to change.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
InterpreterOptions()
Default native constructor.
|
InterpreterOptions(long size)
Native array allocator.
|
InterpreterOptions(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
GetCacheConstantCastOp() |
boolean |
GetDisableDelegateClustering() |
int |
GetDynamicAllocationForLargeTensors()
Returns the size (in bytes) threshold for dynamic tensor allocation
method.
|
boolean |
GetEnsureDynamicTensorsAreReleased()
Returns if the
experimental_ensure_dynamic_tensors_are_released_ feature
is enabled. |
InterpreterOptions |
getPointer(long i) |
boolean |
GetPreserveAllTensors()
Returns if the
experimental_preserve_all_tensors_ feature is enabled. |
void |
OptimizeMemoryForLargeTensors() |
void |
OptimizeMemoryForLargeTensors(int value)
Use dynamic tensor allocation and deallocation method for large tensors
instead of static memory planner.
|
InterpreterOptions |
position(long position) |
void |
SetCacheConstantCastOp(boolean value) |
void |
SetDisableDelegateClustering() |
void |
SetDisableDelegateClustering(boolean value) |
void |
SetEnsureDynamicTensorsAreReleased() |
void |
SetEnsureDynamicTensorsAreReleased(boolean value)
Force all intermediate dynamic tensors to be released once they are not
used by the model.
|
void |
SetPreserveAllTensors() |
void |
SetPreserveAllTensors(boolean value)
Preserving all intermediates tensors for debugging.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public InterpreterOptions()
public InterpreterOptions(long size)
Pointer.position(long)
.public InterpreterOptions(Pointer p)
Pointer(Pointer)
.public InterpreterOptions position(long position)
public InterpreterOptions getPointer(long i)
getPointer
in class Pointer
public void SetPreserveAllTensors(@Cast(value="bool") boolean value)
public void SetPreserveAllTensors()
@Cast(value="bool") public boolean GetPreserveAllTensors()
experimental_preserve_all_tensors_
feature is enabled.
WARNING: This is an experimental API and subject to change.public void SetEnsureDynamicTensorsAreReleased(@Cast(value="bool") boolean value)
public void SetEnsureDynamicTensorsAreReleased()
@Cast(value="bool") public boolean GetEnsureDynamicTensorsAreReleased()
experimental_ensure_dynamic_tensors_are_released_
feature
is enabled.
WARNING: This is an experimental API and subject to change.public void OptimizeMemoryForLargeTensors(int value)
public void OptimizeMemoryForLargeTensors()
public int GetDynamicAllocationForLargeTensors()
public void SetDisableDelegateClustering(@Cast(value="bool") boolean value)
public void SetDisableDelegateClustering()
Copyright © 2025. All rights reserved.