Skip to content

Commit 9688f58

Browse files
committed
update config and readme of antbee
1 parent 99d1b8f commit 9688f58

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

classification/AntBee/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ In this example, we finetune a pretrained resnet18 for classification of images
1717
1. Here we use resnet18 for finetuning, and update all the layers. Open the configure file `config/train_test_ce1.cfg`. In the `network` section we can find details for the network. In the `dataset` section, set the value of `root_dir` as your `AntBee_root`. Then start to train by running:
1818

1919
```bash
20-
pymic_net_run_cls train config/train_test_ce1.cfg
20+
pymic_net_run train config/train_test_ce1.cfg
2121
```
2222

2323
2. During training or after training, run `tensorboard --logdir model/resnet18_ce1` and you will see a link in the output, such as `http://your-computer:6006`. Open the link in the browser and you can observe the average loss and accuracy during the training stage, such as shown in the following images, where blue and red curves are for training set and validation set respectively. The iteration number obtained the highest accuracy on the validation set was 400, and may be different based on the hardware environment. After training, you can find the trained models in `./model/resnet18_ce1`.
@@ -30,7 +30,7 @@ pymic_net_run_cls train config/train_test_ce1.cfg
3030

3131
```bash
3232
mkdir result
33-
pymic_net_run_cls test config/train_test_ce1.cfg
33+
pymic_net_run test config/train_test_ce1.cfg
3434
```
3535

3636
2. Then run the following command to obtain quantitative evaluation results in terms of accuracy.

classification/AntBee/config/train_test_ce1.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# tensor type (float or double)
33
tensor_type = float
44

5+
task_type = cls
56
root_dir = /home/guotai/disk2t/projects/torch_project/transfer_learning/hymenoptera_data
67
train_csv = config/train_data.csv
78
valid_csv = config/valid_data.csv

classification/AntBee/config/train_test_ce2.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# tensor type (float or double)
33
tensor_type = float
44

5+
task_type = cls
56
root_dir = /home/guotai/disk2t/projects/torch_project/transfer_learning/hymenoptera_data
67
train_csv = config/train_data.csv
78
valid_csv = config/valid_data.csv

0 commit comments

Comments
 (0)