"vscode:/vscode.git/clone" did not exist on "c3ab153e935292f5645e3c90347498de25dfbc14"
Commit 3d97d8ff authored by liyinhao's avatar liyinhao Committed by zhangwenwei
Browse files

api_test_docstring and fix benchmark.md

parent e79aced7
...@@ -183,7 +183,7 @@ We compare the training speed (samples/s) with other codebases if they implement ...@@ -183,7 +183,7 @@ We compare the training speed (samples/s) with other codebases if they implement
```bash ```bash
cd tools 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 ### SECOND
...@@ -198,7 +198,7 @@ We compare the training speed (samples/s) with other codebases if they implement ...@@ -198,7 +198,7 @@ We compare the training speed (samples/s) with other codebases if they implement
```bash ```bash
cd tools 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 ### Part-A2
...@@ -213,5 +213,5 @@ We compare the training speed (samples/s) with other codebases if they implement ...@@ -213,5 +213,5 @@ We compare the training speed (samples/s) with other codebases if they implement
```bash ```bash
cd tools 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 ...@@ -3,6 +3,23 @@ import torch
def single_gpu_test(model, data_loader, show=False, out_dir=None): 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() model.eval()
results = [] results = []
dataset = data_loader.dataset dataset = data_loader.dataset
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment