GithubHelp home page GithubHelp logo

apushingboy / triplet-loss-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chencodex/triplet-loss-pytorch

0.0 0.0 0.0 69 KB

A generic triplet data loader for image classification problems,and a triplet loss net demo.

Python 100.00%

triplet-loss-pytorch's Introduction

triplet loss pytorth

本项目使用了pytorch本身自带的TripletMarginLoss 来实现三元组损失。同时自己设计了一个高度兼容的组织三元组数据的Dataloader。

Dataloader 的实现参考了pytorch本身Dataloader的设计理念,使用了数据缓冲区和线程池配合的方案,能让你的模型在GPU上全力运算的同时,CPU和IO提前为你准备好下一个batch的数据。

简而言之,手离键盘脚离地的使用它!

在训练文件中,你可以看到如何使用这个三元组数据装载器的示例,在这里我使用了一个细粒度分类的任务进行处理。 并同时使用了TripletMarginLoss和CrossEntropyLoss进行训练,因为多次的实验表明,这种组合的方式会得到更好的效果(最起码它会收敛更快:))。

Exposure

:name

triplet-loss-pytorch's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.