Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/api/tensor-impl-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export function fromInternalTensor(internalTensor: InternalTensor): ApiTensor {
return new ApiTensor(new Float32Array(internalTensor.floatData), 'float32', internalTensor.dims);
case 'string':
return new ApiTensor(internalTensor.stringData, 'string', internalTensor.dims);
case 'int8' || 'uint8' || 'int16' || 'uint16' || 'uint32':
case 'int8':
case 'uint8':
case 'int16':
case 'uint16':
case 'uint32':
return new ApiTensor(new Int32Array(internalTensor.integerData), 'int32', internalTensor.dims);
case 'int32':
return new ApiTensor(internalTensor.integerData as Int32Array, 'int32', internalTensor.dims);
Expand Down