hoops_ai.dataset.torch_adapter

Classes

TorchAdapter(cad_dataset[, collate_fn])

Adapts CADDataset to PyTorch format

TorchCADDataset(*args, **kwargs)

PyTorch Dataset wrapper for CADDataset

class hoops_ai.dataset.torch_adapter.PrefetchDataLoader(*args, **kwargs)

Bases: DataLoader

Parameters:
  • args (Any)

  • kwargs (Any)

Return type:

Any

class hoops_ai.dataset.torch_adapter.TorchAdapter(cad_dataset, collate_fn=None)

Bases: object

Adapts CADDataset to PyTorch format

get_dataset()

Return a PyTorch Dataset wrapper

class hoops_ai.dataset.torch_adapter.TorchCADDataset(*args, **kwargs)

Bases: Dataset

PyTorch Dataset wrapper for CADDataset

property data_files

Return the list of .bin file paths for this subset only.

get_dataloader(batch_size=64, shuffle=False, num_workers=0)

Create a DataLoader for this dataset

Parameters:

batch_size (int)

property label_datas

Return the list of label arrays for this subset only.

remove_indices(local_indices_to_remove)

Remove items by delegating to the underlying CADDataset