kaolin
kaolin copied to clipboard
point_cloud_classification.ipynb: AttributeError: 'dict' object has no attribute 'view'
Running the cell
engine = ClassificationEngine(PointNet(num_classes=len(categories)),
train_loader, val_loader)
engine.fit()
gives
224
225 for idx, batch in enumerate(self.train_loader):
--> 226 loss, accuracy = self.train_batch(batch)
227 self.optimize_batch(loss)
228 self.print_train_stats()
/opt/conda/envs/lab42/lib/python3.7/site-packages/kaolin-0.1.0-py3.7-linux-x86_64.egg/kaolin/engine/classification.py in train_batch(self, batch)
174 data, label = batch
175 pred = self.model(data)
--> 176 loss = self.criterion(pred, label.view(-1))
177 self.train_loss_cur_epoch += loss.item()
178 predlabel = torch.argmax(pred, dim=1)
AttributeError: 'dict' object has no attribute 'view'
Downloaded the ModelNet10 dataset as instructed. Seems like category is nested within the attributes key of the KaolinDatasetItem.