Skip to content
Snippets Groups Projects
Commit 66245956 authored by zhangwenwei's avatar zhangwenwei
Browse files

Merge branch 'api_test_docstring' into 'master'

api_test_docstring and fix benchmark.md

See merge request open-mmlab/mmdet.3d!146
parents e79aced7 3d97d8ff
No related branches found
No related tags found
No related merge requests found
......@@ -183,7 +183,7 @@ We compare the training speed (samples/s) with other codebases if they implement
```bash
cd tools
sh scripts/slurm_train.sh ${PARTITION} ${JOB_NAME} 8 --cfg_file ./cfgs/pointpillar.yaml --batch_size 32 --workers 32
sh scripts/slurm_train.sh ${PARTITION} ${JOB_NAME} 8 --cfg_file ./cfgs/kitti_models/pointpillar.yaml --batch_size 32 --workers 32 --epochs 80
```
### SECOND
......@@ -198,7 +198,7 @@ We compare the training speed (samples/s) with other codebases if they implement
```bash
cd tools
./scripts/slurm_train.sh ${PARTITION} ${JOB_NAME} 8 --cfg_file ./cfgs/second.yaml --batch_size 32 --workers 32
sh ./scripts/slurm_train.sh ${PARTITION} ${JOB_NAME} 8 --cfg_file ./cfgs/kitti_models/second.yaml --batch_size 32 --workers 32 --epochs 80
```
### Part-A2
......@@ -213,5 +213,5 @@ We compare the training speed (samples/s) with other codebases if they implement
```bash
cd tools
./scripts/slurm_train.sh ${PARTITION} ${JOB_NAME} 8 --cfg_file ./cfgs/PartA2.yaml --batch_size 32 --workers 32
sh ./scripts/slurm_train.sh ${PARTITION} ${JOB_NAME} 8 --cfg_file ./cfgs/kitti_models/PartA2.yaml --batch_size 32 --workers 32 --epochs 80
```
......@@ -3,6 +3,23 @@ import torch
def single_gpu_test(model, data_loader, show=False, out_dir=None):
"""Test model with single gpu.
This method tests model with single gpu and gives the 'show' option.
By setting ``show=True``, it saves the visualization results under
``out_dir``.
Args:
model (nn.Module): Model to be tested.
data_loader (nn.Dataloader): Pytorch data loader.
show (bool): Whether to save viualization results.
Default: True.
out_dir (str): The path to save visualization results.
Default: None.
Returns:
list[dict]: The prediction results.
"""
model.eval()
results = []
dataset = data_loader.dataset
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment