fangpin/siamese-pytorch
关于
Implementation of Siamese Networks for image one-shot learning by PyTorch, train and test model on dataset Omniglot
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Siamese Networks for One-Shot Learning
A reimplementation of the original paper in pytorch with training and testing on the Omniglot dataset.
requirement
- pytorch
- torchvision
- python3.5+
- python-gflags
See requirements.txt
run step
- download dataset
git clone https://github.com/brendenlake/omniglot.git
cd omniglot/python
unzip images_evaluation.zip
unzip images_background.zip
cd ../..
# setup directory for saving models
mkdir models
- train and test by running
python3 train.py --train_path omniglot/python/images_background \
--test_path omniglot/python/images_evaluation \
--gpu_ids 0 \
--model_path models
experiment result
Loss value is sampled after every 200 batches
My final precision is 89.5% a little smaller than the result of the paper (92%).
The small result difference might be caused by some difference between my implementation and the paper's. I list these differences as follows:
- learning rate
instead of using SGD with momentum I just use ADAM.
- parameters initialization and settings
Instead of using individual initialization methods, learning rates and regularization rates at different layers I simply use the default setting of pytorch and keep them same.
探索相关项目
加载中…