Closed Tommydied closed 1 year ago
The first error seems related to torchsparse
. Can you please share the output of:
pip list | grep torch
Also, can you please share the type and shape of x
and skip
in:
File "/home/DeepViewAgg-release/torch_points3d/modules/SparseConv3d/modules.py", line 225, in forward
x = snn.cat(x,skip)
For the second error, the change you made expectedly breaks the code.
Here is the environment in which my code is running:
absl-py 0.12.0
alabaster 0.7.12
antlr4-python3-runtime 4.8
apex 0.1
appdirs 1.4.4
argon2-cffi 20.1.0
ascii-graph 1.5.1
ase 3.22.1
async-generator 1.10
attrs 20.3.0
audioread 2.1.9
Babel 2.9.0
backcall 0.2.0
backports.cached-property 1.0.2
beautifulsoup4 4.9.3
black 23.7.0
bleach 3.3.0
blessings 1.7
blis 0.7.4
boto3 1.17.32
botocore 1.20.32
brotlipy 0.7.0
cachetools 5.3.1
catalogue 1.0.0
certifi 2023.5.7
cffi 1.14.3
chardet 5.1.0
charset-normalizer 3.2.0
click 8.1.5
cloudpickle 2.2.1
codecov 2.1.13
colorama 0.4.6
coloredlogs 15.0.1
colour-runner 0.1.1
conda 4.9.2
conda-build 3.21.4
conda-package-handling 1.7.2
coverage 7.2.7
cryptography 3.2.1
cxxfilt 0.2.2
cycler 0.10.0
cymem 2.0.5
Cython 0.28.4
DataProperty 0.50.0
decorator 4.4.2
deepdiff 6.3.1
defusedxml 0.7.1
detectron2 0.6
distlib 0.3.7
DLLogger 0.1.0
docker-pycreds 0.4.0
docutils 0.16
entrypoints 0.3
faiss-gpu 1.6.5
filelock 3.12.2
flake8 3.7.9
Flask 1.1.2
future 0.18.2
fvcore 0.1.5.post20221221
gdown 4.7.1
gitdb 4.0.10
GitPython 3.1.32
glob2 0.7
googledrivedownloader 0.4
graphsurgeon 0.4.5
grpcio 1.36.1
h5py 3.2.1
html2text 2020.1.16
humanfriendly 10.0
hydra-core 1.1.0
hypothesis 4.50.8
idna 3.4
imageio 2.9.0
imagesize 1.2.0
importlib-metadata 3.7.3
importlib-resources 6.0.0
inflect 5.3.0
iniconfig 1.1.1
iopath 0.1.9
ipdb 0.13.7
ipykernel 5.5.0
ipython 7.21.0
ipython-genutils 0.2.0
isodate 0.6.1
itsdangerous 1.1.0
jedi 0.17.0
Jinja2 2.11.3
jmespath 0.10.0
joblib 1.3.1
json5 0.9.5
jsonpatch 1.33
jsonpointer 2.4
jsonschema 3.0.2
jupyter-client 6.1.12
jupyter-core 4.7.1
jupyter-tensorboard 0.2.0
jupyterlab 2.2.9
jupyterlab-pygments 0.1.2
jupyterlab-server 1.2.0
jupytext 1.11.0
kiwisolver 1.3.1
libarchive-c 2.9
librosa 0.8.0
llvmlite 0.35.0
lmdb 1.1.1
Mako 1.1.4
Markdown 3.3.4
markdown-it-py 0.6.2
MarkupSafe 1.1.1
maskrcnn-benchmark 0.1
matplotlib 3.3.4
mbstrdecoder 1.0.1
mccabe 0.6.1
mdit-py-plugins 0.2.6
mistune 0.8.4
mit-semseg 1.0.0
mlperf-compliance 0.0.10
mock 4.0.3
msgfy 0.1.0
murmurhash 1.0.5
mypy-extensions 1.0.0
nbclient 0.5.3
nbconvert 6.0.7
nbformat 5.1.2
nest-asyncio 1.5.1
networkx 2.0
nltk 3.5
notebook 6.2.0
numba 0.52.0
numpy 1.23.0
nvidia-dali-cuda110 0.31.0
nvidia-dlprof-pytorch-nvtx 1.0.0
nvidia-pyprof 3.9.0
nvidia-tensorboard 1.15.0+nv21.3
nvidia-tensorboard-plugin-dlprof 0.12
omegaconf 2.1.2
onnx 1.8.0
onnxruntime 1.7.0
opencv-python 4.5.5.64
ordered-set 4.1.0
packaging 23.1
pandas 1.1.4
pandocfilters 1.4.3
parso 0.8.1
pathspec 0.11.1
pathtools 0.1.2
pathvalidate 2.3.2
pexpect 4.8.0
pickleshare 0.7.5
Pillow 10.0.0
Pillow-SIMD 7.0.0.post3
pip 20.2.4
pkginfo 1.7.0
plac 1.1.0
platformdirs 3.9.1
plotly 5.4.0
pluggy 1.2.0
plyfile 1.0
polygraphy 0.25.1
pooch 1.3.0
portalocker 2.7.0
preshed 3.0.2
prettytable 2.1.0
progressbar 2.5
prometheus-client 0.9.0
prompt-toolkit 3.0.8
protobuf 3.15.6
psutil 5.8.0
ptyprocess 0.7.0
py 1.10.0
pybind11 2.6.2
pycocotools 2.0.6
pycodestyle 2.5.0
pycosat 0.6.3
pycparser 2.20
pycuda 2020.1
pydot 1.4.2
pyflakes 2.1.1
Pygments 2.15.1
pykeops 1.4.2
pynvml 8.0.4
pyOpenSSL 19.1.0
pyparsing 2.4.7
pypng 0.20220715.0
pyproject-api 1.5.3
pyrsistent 0.17.3
PySocks 1.7.1
pytablewriter 0.47.0
pytest 6.2.2
pytest-cov 2.11.1
pytest-pythonpath 0.7.3
python-dateutil 2.8.1
python-hostlist 1.21
python-louvain 0.16
python-nvd3 0.15.0
python-slugify 4.0.1
pytools 2021.2
pytorch-metric-learning 2.2.0
pytorch-quantization 2.1.0
pytorch-transformers 1.1.0
pytz 2021.1
PyWavelets 1.1.1
PyYAML 5.4.1
pyzmq 22.0.3
rdflib 6.3.2
regex 2021.3.17
requests 2.31.0
resampy 0.2.2
revtok 0.0.3
rootpath 0.1.1
ruamel-yaml 0.15.87
s3transfer 0.3.6
sacrebleu 1.2.10
sacremoses 0.0.35
scikit-image 0.15.0
scikit-learn 1.0.2
scipy 1.6.1
seaborn 0.12.2
Send2Trash 1.5.0
sentencepiece 0.1.95
sentry-sdk 1.28.1
setproctitle 1.3.2
setuptools 50.3.1.post20201107
six 1.16.0
smmap 5.0.0
snowballstemmer 2.1.0
SoundFile 0.10.3.post1
soupsieve 2.2
sox 1.4.1
spacy 2.3.5
Sphinx 3.5.2
sphinx-glpi-theme 0.3
sphinx-rtd-theme 0.5.1
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 1.0.3
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.4
srsly 1.0.5
subword-nmt 0.3.3
tabledata 1.1.3
tabulate 0.8.9
tenacity 8.2.2
tensorboard 1.15.9999+nv
tensorrt 7.2.2.3
termcolor 2.3.0
terminado 0.9.3
testpath 0.4.4
text-unidecode 1.3
thinc 7.4.5
threadpoolctl 2.2.0
toml 0.10.2
tomli 2.0.1
torch 1.9.0a0+df837d0
torch-cluster 1.5.9
torch-geometric 1.7.0
torch-points-kernels 0.6.10
torch-scatter 2.0.9
torch-sparse 0.6.12
torch-spline-conv 1.2.1
torchnet 0.0.4
torchsparse 1.4.0
torchvision 0.9.0a0
tornado 6.1
tox 4.6.4
tqdm 4.65.0
traitlets 5.0.5
typepy 1.1.4
typing-extensions 4.7.1
uff 0.6.9
Unidecode 1.2.0
urllib3 2.0.3
virtualenv 20.24.0
visdom 0.2.4
wandb 0.15.5
wasabi 0.8.2
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.6.1
Werkzeug 1.0.1
wheel 0.40.0
wrapt 1.10.11
yacs 0.1.8
zipp 3.4.1
and here is type(self.input.x)
<class 'torchsparse.tensor.SparseTensor'>
here is shape of x
['C', 'F', '__add__', '__class__', '__delattr__', '__dict__', '__dir__',
'__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__',
'__hash__', '__init__', '__init_subclass__', '__le__', '__lt__',
'__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__',
'__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__',
'__weakref__', 'cmaps', 'coords', 'cuda', 'detach', 'feats', 'kmaps', 's',
'stride', 'to']
here is shape of skip
['C', 'F', '__add__', '__class__', '__delattr__', '__dict__', '__dir__',
'__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__',
'__hash__', '__init__', '__init_subclass__', '__le__', '__lt__',
'__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__',
'__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__',
'__weakref__', 'cmaps', 'coords', 'cuda', 'detach', 'feats', 'kmaps', 's',
'stride', 'to']
I notice several discrepancies between your dependencies and what you should have had if you installed the project using ./install.sh
as recommended.
In particular, you should have:
torch-geometric==1.6.3
torch==1.7.1
torchsparse==1.1.0
Some of these libraries are not backward-compatible, which means installing more recent versions will break this project.
Please make sure you install the project by running the provided, untouched ./install.sh
. Only then, please test again and let me know how things go.
I try to change my environment to
torch-geometric==1.6.3
torch==1.7.1
torchsparse==1.1.0
The error results provided this time are different from the last time. The reason is that the previous error results were the outcome of extensive modifications made by me. This time, I would like to provide the problem I encountered initially.
[2023-07-24 03:29:14,538][torch_points3d.applications.modelfactory][INFO] -
The config will be used to build the model
Error executing job with overrides: ['data=segmentation/kitti360-sparse',
'models=segmentation/sparseconv3d', 'model_name=Res16UNet34',
'task=segmentation', 'training=kitti360_benchmark/sparseconv3d',
'lr_scheduler=multi_step_kitti360', 'eval_frequency=5',
'data.sample_per_epoch=12000', 'data.dataroot=./directory',
'data.train_is_trainval=False', 'data.mini=False', 'training.cuda=0',
'training.batch_size=8', 'training.epochs=60', 'training.num_workers=0',
'training.optim.base_lr=0.1', 'training.wandb.log=True', '
training.wandb.name=My_awesome_KITTI-360_experiment',
'tracker_options.make_submission=False', 'training.checkpoint_dir=']
Traceback (most recent call last):
File "train.py", line 13, in main
trainer = Trainer(cfg)
File "/home/DeepViewAgg-release/torch_points3d/trainer.py", line 46, in
__init__
self._initialize_trainer()
File "/home/DeepViewAgg-release/torch_points3d/trainer.py", line 93, in
_initialize_trainer
self._model: BaseModel = instantiate_model(
File "/home/DeepViewAgg-release/torch_points3d/models/model_factory.py",
line 44, in instantiate_model
model = model_cls(model_config, "dummy", dataset, modellib)
File
"/home/DeepViewAgg-release/torch_points3d/models/segmentation/sparseconv3d.py",
line 20, in __init__
self.backbone = SparseConv3d(
File
"/home/DeepViewAgg-release/torch_points3d/applications/sparseconv3d.py",
line 74, in SparseConv3d
return factory.build()
File
"/home/DeepViewAgg-release/torch_points3d/applications/modelfactory.py",
line 73, in build
return self._build_unet()
File
"/home/DeepViewAgg-release/torch_points3d/applications/sparseconv3d.py",
line 88, in _build_unet
return SparseConv3dUnet(model_config, None, None, modules_lib,
File
"/home/DeepViewAgg-release/torch_points3d/applications/sparseconv3d.py",
line 112, in __init__
super().__init__(model_config, model_type, dataset, modules)
File
"/home/DeepViewAgg-release/torch_points3d/models/base_architectures/unet.py",
line 399, in __init__
self._init_from_compact_format(
File
"/home/DeepViewAgg-release/torch_points3d/models/base_architectures/unet.py",
line 444, in _init_from_compact_format
down_conv_3d = self._build_module(opt.down_conv, i, flow="DOWN")
File
"/home/DeepViewAgg-release/torch_points3d/models/base_architectures/unet.py",
line 641, in _build_module
return module(**args)
File
"/home/DeepViewAgg-release/torch_points3d/modules/SparseConv3d/modules.py",
line 140, in __init__
.append(snn.ReLU()))
TypeError: 'NoneType' object is not callable
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Damien ROBERT @.***> 於 2023年7月20日 週四 下午8:52寫道:
I notice several discrepancies between your dependencies and what you should have had if you installed the project using ./install.sh as recommended.
In particular, you should have:
- torch-geometric==1.6.3
- torch==1.7.1
- torchsparse==1.1.0
Some of these libraries are not backward-compatible, which means installing more recent versions will break this project.
Please make sure you install the project by running the provided, untouched ./install.sh. Only then, please test again and let me know how things go.
— Reply to this email directly, view it on GitHub https://github.com/drprojects/DeepViewAgg/issues/28#issuecomment-1643872435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZTNDAQUP7BLCQJG6UU3XGLXRESZVANCNFSM6AAAAAA2RC6D7I . You are receiving this because you authored the thread.Message ID: @.***>
And the following is the issue I encountered with the modified code, which resulted in an error during execution. The previous issue was indeed resolved by modifying the environment settings.
[2023-07-24 04:15:38,128][torch_points3d.datasets.base_dataset][INFO] - Available stage selection datasets: ['test', 'val'] [2023-07-24 04:15:38,128][torch_points3d.datasets.base_dataset][INFO] - The models will be selected using the metrics on following dataset: val [2023-07-24 04:16:05,775][torch_points3d.trainer][INFO] - EPOCH 1 / 60 0% |
---|
0/1500 [00:00<?, ?it/s]tensor([[0.5550, 1.3774, 0.2385, ..., 0.8033,
0.0000, 0.0931],
[0.7979, 0.4388, 0.0000, ..., 1.3618, 1.0692, 0.2139],
[1.2967, 2.9628, 1.8621, ..., 1.5412, 0.0000, 3.7810],
...,
[0.5269, 0.0000, 0.3898, ..., 0.8157, 0.2076, 0.2457],
[0.3073, 0.8492, 1.1453, ..., 0.1847, 0.0000, 0.5820],
[1.1201, 0.3403, 0.0000, ..., 0.0000, 1.1997, 0.1137]],
device='cuda:0', grad_fn= |
---|
0/1500 [00:02<?, ?it/s] Error executing job with overrides: ['data=segmentation/kitti360-sparse', 'models=segmentation/sparseconv3d', 'model_name=Res16UNet34', 'task=segmentation', 'training=kitti360_benchmark/sparseconv3d', 'lr_scheduler=multi_step_kitti360', 'eval_frequency=5', 'data.sample_per_epoch=12000', 'data.dataroot=./directory', 'data.train_is_trainval=False', 'data.mini=False', 'training.cuda=0', 'training.batch_size=8', 'training.epochs=60', 'training.num_workers=0', 'training.optim.base_lr=0.1', 'training.wandb.log=True', ' training.wandb.name=My_awesome_KITTI-360_experiment', 'tracker_options.make_submission=False', 'training.checkpoint_dir='] Traceback (most recent call last): File "train.py", line 14, in main trainer.train() File "/home/DeepViewAgg-release/torch_points3d/trainer.py", line 146, in train self._train_epoch(epoch) File "/home/DeepViewAgg-release/torch_points3d/trainer.py", line 201, in _train_epoch self._model.optimize_parameters(epoch, self._dataset.batch_size) File "/home/DeepViewAgg-release/torch_points3d/models/base_model.py", line 245, in optimize_parameters self.forward(epoch=epoch) # first call forward to calculate intermediate results File "/home/DeepViewAgg-release/torch_points3d/models/segmentation/sparseconv3d.py", line 55, in forward self.loss_cross_entropy = F.nll_loss(self.output, self.labels, ignore_index=IGNORE_LABEL, weight=self._weight_classes) File "/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py", line 2261, in nll_loss raise ValueError('Expected input batch_size ({}) to match target batch_size ({}).' ValueError: Expected input batch_size (84528) to match target batch_size (40).
the shape of self.output: print(self.output.shape) torch.Size([84528, 4]) the shape of self.labels: print(self.labels.shape) torch.Size([40])
and I found that the shape of self.output is constantly changing I didn't understand why it would happen
秦瑋謙 @.***> 於 2023年7月24日 週一 上午11:38寫道:
I try to change my environment to
- torch-geometric==1.6.3
- torch==1.7.1
- torchsparse==1.1.0
The error results provided this time are different from the last time. The reason is that the previous error results were the outcome of extensive modifications made by me. This time, I would like to provide the problem I encountered initially.
[2023-07-24 03:29:14,538][torch_points3d.applications.modelfactory][INFO]
- The config will be used to build the model Error executing job with overrides: ['data=segmentation/kitti360-sparse', 'models=segmentation/sparseconv3d', 'model_name=Res16UNet34', 'task=segmentation', 'training=kitti360_benchmark/sparseconv3d', 'lr_scheduler=multi_step_kitti360', 'eval_frequency=5', 'data.sample_per_epoch=12000', 'data.dataroot=./directory', 'data.train_is_trainval=False', 'data.mini=False', 'training.cuda=0', 'training.batch_size=8', 'training.epochs=60', 'training.num_workers=0', 'training.optim.base_lr=0.1', 'training.wandb.log=True', ' training.wandb.name=My_awesome_KITTI-360_experiment', 'tracker_options.make_submission=False', 'training.checkpoint_dir='] Traceback (most recent call last): File "train.py", line 13, in main trainer = Trainer(cfg) File "/home/DeepViewAgg-release/torch_points3d/trainer.py", line 46, in init self._initialize_trainer() File "/home/DeepViewAgg-release/torch_points3d/trainer.py", line 93, in _initialize_trainer self._model: BaseModel = instantiate_model( File "/home/DeepViewAgg-release/torch_points3d/models/model_factory.py", line 44, in instantiate_model model = model_cls(model_config, "dummy", dataset, modellib) File "/home/DeepViewAgg-release/torch_points3d/models/segmentation/sparseconv3d.py", line 20, in init self.backbone = SparseConv3d( File "/home/DeepViewAgg-release/torch_points3d/applications/sparseconv3d.py", line 74, in SparseConv3d return factory.build() File "/home/DeepViewAgg-release/torch_points3d/applications/modelfactory.py", line 73, in build return self._build_unet() File "/home/DeepViewAgg-release/torch_points3d/applications/sparseconv3d.py", line 88, in _build_unet return SparseConv3dUnet(model_config, None, None, modules_lib, File "/home/DeepViewAgg-release/torch_points3d/applications/sparseconv3d.py", line 112, in init super().init(model_config, model_type, dataset, modules) File "/home/DeepViewAgg-release/torch_points3d/models/base_architectures/unet.py", line 399, in init self._init_from_compact_format( File "/home/DeepViewAgg-release/torch_points3d/models/base_architectures/unet.py", line 444, in _init_from_compact_format down_conv_3d = self._build_module(opt.down_conv, i, flow="DOWN") File "/home/DeepViewAgg-release/torch_points3d/models/base_architectures/unet.py", line 641, in _build_module return module(**args) File "/home/DeepViewAgg-release/torch_points3d/modules/SparseConv3d/modules.py", line 140, in init .append(snn.ReLU())) TypeError: 'NoneType' object is not callable
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Damien ROBERT @.***> 於 2023年7月20日 週四 下午8:52寫道:
I notice several discrepancies between your dependencies and what you should have had if you installed the project using ./install.sh as recommended.
In particular, you should have:
- torch-geometric==1.6.3
- torch==1.7.1
- torchsparse==1.1.0
Some of these libraries are not backward-compatible, which means installing more recent versions will break this project.
Please make sure you install the project by running the provided, untouched ./install.sh. Only then, please test again and let me know how things go.
— Reply to this email directly, view it on GitHub https://github.com/drprojects/DeepViewAgg/issues/28#issuecomment-1643872435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZTNDAQUP7BLCQJG6UU3XGLXRESZVANCNFSM6AAAAAA2RC6D7I . You are receiving this because you authored the thread.Message ID: @.***>
Hi, based on what you say and on issue #27, it sounds like you have been making some modifications to the project.
I am really glad :blush: you find this project interesting and are trying to make use of it. However, there are limits to how much time I can dedicate for support here:
:heavy_check_mark: I can provide help to clarify how the released code works and make some suggestions on how to extend the current codebase.
:x: I cannot provide support for things I did not build myself and that break the way the project works.
Can you please make sure that you have not modified essential files and share the output of:
git status
and of:
git diff c94656c190b3a58c67587719091677907cd8db3f YOUR_CURRENT_COMMIT
Besides, it seems you have been mostly using this project for 3D-only semantic segmentation on KITTI-360. Do you also intend to use 2D images along with 3D points for 3D semantic segmentation, in your current project ? If not, the present project is overkill for your needs and you may be better off using the official torch-points3d
repo.
Thank you for your response.
Damien ROBERT @.***> 於 2023年7月24日 週一 下午1:28寫道:
Hi, based on what you say and on issue #27 https://github.com/drprojects/DeepViewAgg/issues/27, it sounds like you have been making some modifications to the project.
I am really glad 😊 you find this project interesting and are trying to make use of it. However, there are limits to how much time I can dedicate for support here:
-
✔️ I can provide help to clarify how the released code works and make some suggestions on how to extend the current codebase.
❌ I cannot provide support for things I did not build myself and that break the way the project works.
Can you please make sure that you have not modified essential files and share the output of:
git status
and of:
git diff c94656c190b3a58c67587719091677907cd8db3f YOUR_CURRENT_COMMIT
Besides, it seems you have been mostly using this project for 3D-only semantic segmentation on KITTI-360. Do you also intend to use 2D images along with 3D points for 3D semantic segmentation, in your current project ? If not, the present project is overkill for your needs and you may be better off using the official torch-points3d repo.
— Reply to this email directly, view it on GitHub https://github.com/drprojects/DeepViewAgg/issues/28#issuecomment-1647232653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZTNDAWKDFGCSN6BQTMRVJTXRYBXRANCNFSM6AAAAAA2RC6D7I . You are receiving this because you authored the thread.Message ID: @.***>
Without further details from you, I consider this issue closed.
I encountered the following problem while training the 3D point cloud model:
and the wrong code is
features=self.backbone ( self.input ).x
I try to solve this problem and do the following adjustmentsfeatures=self.backbone ( self.input.x )