Tensor_int8 Class — pytorch Architecture
Architecture documentation for the Tensor_int8 class in Tensor.java from the pytorch codebase.
Entity Profile
Relationship Graph
Source Code
android/pytorch_android/src/main/java/org/pytorch/Tensor.java lines 519–549
static class Tensor_int8 extends Tensor {
private final ByteBuffer data;
private Tensor_int8(ByteBuffer data, long[] shape, MemoryFormat memoryFormat) {
super(shape, memoryFormat);
this.data = data;
}
@Override
public DType dtype() {
return DType.INT8;
}
@Override
Buffer getRawDataBuffer() {
return data;
}
@Override
public byte[] getDataAsByteArray() {
data.rewind();
byte[] arr = new byte[data.remaining()];
data.get(arr);
return arr;
}
@Override
public String toString() {
return String.format("Tensor(%s, dtype=torch.int8)", Arrays.toString(shape));
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free