Comments (11)
感谢您的建议,我已经成功解决了我的问题,真的非常感谢您的建议!
from clocs.
Hello @xuV2 . If one needs to add more channels (or modify the number of channels), these places below need to be modified:
(1)you also need to modify the build_stage2_training function below, add another colum in variable "overlaps".
Line 127 in cad14fd
(2)change the hardcoded "4" channels into "5", from line 521-527 (or other number of channels if you want):
CLOCs/second/pytorch/models/voxelnet.py
Line 503 in cad14fd
(3)change the hardcoded "4" into "5" in CLOCs model:
CLOCs/second/pytorch/models/fusion.py
Line 27 in cad14fd
My apology to hardcoded these information. I'll update the repo later to remove these hardcoded value.
from clocs.
Hello! @pangsu0613 First of all, thank you for your prompt reply. But I have changed the code you mentioned, but when the code runs to train.py(line 279) during training, it will still make mistakes.When I delete 279 lines, the code can be trained.
CLOCs/blob/master/second/pytorch/train.py
279 mixed_optimizer.step()
from clocs.
The reason for the error is
RuntimeError: The size of tensor a (4) must match the size of tensor b (5) at non-singleton dimension 1
from clocs.
mixed_optimizer.step() should not be deleted. Could you show me the whole error message?
from clocs.
Traceback (most recent call last):
File "./pytorch/train.py", line 985, in
fire.Fire()
File "/root/anaconda3/envs/CLOCs/lib/python3.6/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/root/anaconda3/envs/CLOCs/lib/python3.6/site-packages/fire/core.py", line 471, in Fire
target=component.name)
File "/root/anaconda3/envs/CLOCs/lib/python3.6/site-packages/fire/core.py", line 681, in CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "./pytorch/train.py", line 431, in train
raise e
File "./pytorch/train.py", line 336, in train
mixed_optimizer.step() # 这句话有问题 # 通过梯度下降更新参数
File "/root/CLOCs/torchplus/train/fastai_optim.py", line 136, in step
self.opt.step() # 有问题
File "/root/anaconda3/envs/CLOCs/lib/python3.6/site-packages/torch/optim/adam.py", line 93, in step
exp_avg.mul(beta1).add(1 - beta1, grad)
RuntimeError: The size of tensor a (4) must match the size of tensor b (5) at non-singleton dimension 1
from clocs.
did you change the "4" at line 521 and line 524 in voxelnet.py?
from clocs.
iou_test_tensor = iou_test_tensor.reshape(1, 5, 1, 900000) # 原来是4
# print(iou_test_tensor.shape) (1, 5, 1, 900000)
tensor_index_tensor = tensor_index_tensor.reshape(-1, 2)
if max_num == 0:
non_empty_iou_test_tensor = torch.zeros(1, 5, 1, 2)
non_empty_iou_test_tensor[:, :, :, :] = -1
non_empty_tensor_index_tensor = torch.zeros(2, 2)
non_empty_tensor_index_tensor[:, :] = -1
else:
non_empty_iou_test_tensor = iou_test_tensor[:, :, :, :max_num]
# print(non_empty_iou_test_tensor.shape) # torch.Size([1, 5, 1, 313987])
non_empty_tensor_index_tensor = tensor_index_tensor[:max_num, :]
from clocs.
could you delete all the files in the working directory (including the adam_optimizer-xxxx.tckpt and other files)?
from clocs.
I'm sorry I don't have this ability. I'm just a novice.
from clocs.
when you run training in the terminal:
python ./pytorch/train.py train --config_path=./configs/car.fhd.config --model_dir=/dir/to/your_model_dir
you create a model directory (--model_dir=/dir/to/your_model_dir), just delete everything in that directory.
from clocs.
Related Issues (20)
- Adding temporal data to clocs_SecCas HOT 20
- How do you select the best CLOCs model when submitting to test server? HOT 2
- Visualization tools HOT 1
- fuse other 2D detection HOT 6
- About ablation study HOT 1
- training time HOT 1
- About evaluation
- no model named second HOT 2
- when i running train.py
- Depth information from 2D boxes(Cascade-Rcnn) HOT 4
- Questions about draw figures of qualitative results. HOT 1
- Fast CLOCs HOT 1
- RuntimeError
- The result of your paper is different from the result of the code. HOT 5
- How to get the result of old 11 recall points?
- Empty cyclist tensor HOT 1
- which file has the IoU calculation code to select non-empty elements ( candidates)? HOT 1
- second.data
- efficiency
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 clocs.