kaolin
kaolin copied to clipboard
point_cloud_classification.ipynb: TypeError: initialize() got an unexpected keyword argument 'device'
In the example notebook, the dataset class does not accept a device argument. How does one cast the loader to cuda in this example?:
val_loader = DataLoader(ModelNet(modelnet_path, categories=categories,
split='test',transform=transform, device=device),
batch_size=12)
yields
in __init__(self, preprocessing_transform, preprocessing_params, transform, no_progress, *args, **kwargs)
89 no_progress (bool): disable tqdm progress bar for preprocessing.
90 """
---> 91 self.initialize(*args, **kwargs)
92 if preprocessing_transform is not None:
93 desc = 'Applying preprocessing'
TypeError: initialize() got an unexpected keyword argument 'device'
If run without device arg:
engine = ClassificationEngine(PointNet(num_classes=len(categories)),
train_loader, val_loader, device=device)
engine.fit()
yields
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same
What works is adding a cuda cast to the data via transforms and label via
_get_attributes works (albeit hacky).
Thank you @msieb1 for helping us make Kaolin better! If you still had trouble getting started with that example, PR #264 fixes the issues you found.
Closing as this is related to v0.1