Comments (1)
Hi, you are encountering this problem because there is a bug in the original code located in ./ml3d/torch/modules/losses/semseg_loss.py. The issue arises because the code expects a tensor with 8 values (num of valid classes), but you are passing a list of tensors instead. You should use .squeeze() to fix this. Here is my corrected code (line 40):"
`
def __init__(self, pipeline, model, dataset, device):
super(SemSegLoss, self).__init__()
# weighted_CrossEntropyLoss
if 'class_weights' in dataset.cfg.keys() and len(
dataset.cfg.class_weights) != 0:
class_wt = DataProcessing.get_class_weights(
dataset.cfg.class_weights)
weights = torch.tensor(class_wt, dtype=torch.float, device=device)
weights = weights.squeeze()
self.weighted_CrossEntropyLoss = nn.CrossEntropyLoss(weight=weights)
else:
self.weighted_CrossEntropyLoss = nn.CrossEntropyLoss()
`
from open3d-ml.
Related Issues (20)
- Pointpillars parameter for custom dataset.
- "Cannot use ml3d on Windows10"—Exception: Open3D was not built with PyTorch support! HOT 2
- How do I add a custom colormap to o3dml.vis.Visualizer programmatically? HOT 1
- mean acc and mean iou are low, training on S3DIS. Is that normal?
- Difficulty Installing on Jetson Orin Nano (Jetpack 5.1.2)
- How to visualize network predictions for semantickitti HOT 1
- Problem getting overall accuracy and mean intersection over union (mIoU)
- Creating custom data from Toronto3d For ground and Roadmarking.
- Summarize the issue and your environments (e.g., "Cannot import ml3d on Ubuntu 20.04 with CUDA") HOT 1
- Importing opend3d fails since open3d-ml doesn't check for build_gui
- AttributeError: 'ConfigDict' object has no attribute 'train_dir' in SemanticSegmentation
- Train RandLANet from Readme does not seem to work HOT 1
- Running `scripts/run_pipeline.py` torch and semantic kitti results in pickling error HOT 1
- Query about test point labels for the ParisLille3D Dataset
- Does KNNSearch not support CUDA?
- ContinuousConv on CUDA returns 0.0 (Open3D 0.18) HOT 1
- Link to TUM FACADE dataset is invalid
- Point Transformer training for SemanticKitti dataset
- Summarize the question. (e.g., "How to do inference on custom dataset ? ")
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open3d-ml.