Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何用自己的训练集测试以及更改网络结构和类的数量 #3

Open
DDDoriM1 opened this issue Apr 16, 2019 · 1 comment

Comments

@DDDoriM1
Copy link

DDDoriM1 commented Apr 16, 2019

您好,我看了您的博客。讲的非常清楚,但是我想用自己的数据集(并不是人脸检测的数据集)做一下分类试试看效果。按照您说的方法改了路径后可以成功运行train_tripletloss.py文件,但是希望博主可以告诉我一下如何更改类的数量、网络结构以及如何设置测试集。因为训练文件没有看到网络结构在哪儿也没看到类的数量在哪儿,测试集这边有个pairs.txt文件有点懵逼。。
谢谢博主的博客!!!真的帮了非常大的忙!!

@boyliwensheng
Copy link
Owner

这些配置都在 train_tripletloss.py 文件中。
类的数量不需要自己指定,程序每个min-batch中抽取的类的数量在这里更改:

    parser.add_argument('--people_per_batch', type=int,
        help='Number of people per batch.', default=45)
    parser.add_argument('--images_per_person', type=int,
        help='Number of images per person.', default=20)

网络结构在这里更改:

    parser.add_argument('--model_def', type=str,
        help='Model definition. Points to a module containing the definition of the inference graph.', default='models.inception_resnet_v1')

可选的有inceptionv1、inceptionv2、squeezenet三个结构。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants