Shape#

class vulkpy.Shape#

Bases: U32Array

GPU Array of uint (32bit) for shape

Methods Summary

flush()

Flush Buffer to GPU

to_onehot(num_classes)

Convert to one hot vector

wait()

Wait Last Job

Methods Documentation

flush()#

Flush Buffer to GPU

to_onehot(num_classes: int) Array#

Convert to one hot vector

Parameters:

num_classes (int) – Number of classes

Returns:

One hot vector

Return type:

vulkpy.Array

wait()#

Wait Last Job

__init__(gpu: GPU, *, data: Iterable[int] | None = None, ndim: int | None = None)#

Initialize Shape

Parameters:
  • gpu (vulkpy.GPU) – GPU

  • data (iterable of ints, optional) – Data

  • ndim (int, optional) – ndim