torch.DTypeRegistry
export interface DTypeRegistry {
float32: 'float32';
float16: 'float16';
int32: 'int32';
uint32: 'uint32';
int8: 'int8';
uint8: 'uint8';
bool: 'bool';
complex64: 'complex64';
}float32('float32')float16('float16')int32('int32')uint32('uint32')int8('int8')uint8('uint8')bool('bool')complex64('complex64')
Registry of all dtype names.
This interface is extended via declaration merging when custom dtypes are registered. This enables TypeScript to know about custom dtypes at compile time.
Examples
declare module '@torchjsorg/torch.js' {
interface DTypeRegistry {
quaternion_f32: 'quaternion_f32';
octonion_f32: 'octonion_f32';
}
}