All Projects → wy1iu → NSL

wy1iu / NSL

Licence: MIT license
Implementation for <Neural Similarity Learning> in NeurIPS'19.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to NSL

Transferlearning
Transfer learning / domain adaptation / domain generalization / multi-task learning etc. Papers, codes, datasets, applications, tutorials.-迁移学习
Stars: ✭ 8,481 (+25600%)
Mutual labels:  meta-learning, few-shot
FSL-Mate
FSL-Mate: A collection of resources for few-shot learning (FSL).
Stars: ✭ 1,346 (+3978.79%)
Mutual labels:  meta-learning, few-shot
dmfont
Official PyTorch implementation of DM-Font (ECCV 2020)
Stars: ✭ 110 (+233.33%)
Mutual labels:  few-shot
Build-Former
This is a library for building forms dynamically in Android.
Stars: ✭ 20 (-39.39%)
Mutual labels:  dynamic
awesome-few-shot-meta-learning
awesome few shot / meta learning papers
Stars: ✭ 44 (+33.33%)
Mutual labels:  meta-learning
laravel-livewire-modals
Dynamic Laravel Livewire Bootstrap modals.
Stars: ✭ 63 (+90.91%)
Mutual labels:  dynamic
nextjs-redirect
HOC to redirect to any URL in NextJS both in client and server
Stars: ✭ 144 (+336.36%)
Mutual labels:  dynamic
venusscript
A dynamic, interpreted, scripting language written in Java.
Stars: ✭ 17 (-48.48%)
Mutual labels:  dynamic
dynamic-app
Dynamic Forms Builder are reusable and make building large-scale applications easier (Easy Peasy)
Stars: ✭ 15 (-54.55%)
Mutual labels:  dynamic
TwinBert
pytorch implementation of the TwinBert paper
Stars: ✭ 36 (+9.09%)
Mutual labels:  similarity
Learning-To-Compare-For-Text
Learning To Compare For Text , Few shot learning in text classification
Stars: ✭ 38 (+15.15%)
Mutual labels:  meta-learning
dynamic-threadpool
📌 强大的动态线程池框架,附带监控报警功能。支持 JDK、Tomcat、Jetty、Undertow 线程池;Dubbo、Dubbox、RabbitMQ、RocketMQ、Hystrix 消费线程池(更多框架线程池还在适配中)。内置两种使用模式:轻量级依赖配置中心以及无中间件依赖版本。
Stars: ✭ 3,609 (+10836.36%)
Mutual labels:  dynamic
siamese dssm
siamese dssm sentence_similarity sentece_similarity_rank tensorflow
Stars: ✭ 59 (+78.79%)
Mutual labels:  similarity
joineRML
R package for fitting joint models to time-to-event data and multivariate longitudinal data
Stars: ✭ 24 (-27.27%)
Mutual labels:  dynamic
MetaD2A
Official PyTorch implementation of "Rapid Neural Architecture Search by Learning to Generate Graphs from Datasets" (ICLR 2021)
Stars: ✭ 49 (+48.48%)
Mutual labels:  meta-learning
Kendo.DynamicLinqCore
KendoNET.DynamicLinq implements server paging, filtering, sorting, grouping, and aggregating to Kendo UI via Dynamic Linq for .Net Core App(1.x ~ 3.x).
Stars: ✭ 36 (+9.09%)
Mutual labels:  dynamic
Awesome-Few-shot
Awesome Few-shot learning
Stars: ✭ 50 (+51.52%)
Mutual labels:  meta-learning
Equinox
🌇 🌃 Create dynamic wallpapers for macOS.
Stars: ✭ 737 (+2133.33%)
Mutual labels:  dynamic
scrapy helper
Dynamic configurable crawl (动态可配置化爬虫)
Stars: ✭ 84 (+154.55%)
Mutual labels:  dynamic
action-dynamic-readme
~ Dynamic ReadME Generator ~
Stars: ✭ 29 (-12.12%)
Mutual labels:  dynamic

Neural Similarity Learning

By Weiyang Liu*, Zhen Liu*, James Rehg, Le Song (* equal contribution)

License

NSL is released under the MIT License (refer to the LICENSE file for details).

Updates

  • Code for image classification on CIFAR-10/100
  • Code for Self-Attention SphereNet (Global Neural Similarity)
  • Code for few-shot classification on Mini-ImageNet

Contents

  1. Introduction
  2. Citation
  3. Requirements
  4. Usage

Introduction

Inner product-based convolution has been the founding stone of convolutional neural networks (CNNs), enabling end-to-end learning of visual representation. By generalizing inner product with a bilinear matrix, we propose the neural similarity which serves as a learnable parametric similarity measure for CNNs. Neural similarity naturally generalizes the convolution and enhances flexibility. Further, we consider the neural similarity learning (NSL) in order to learn the neural similarity adaptively from training data. Specifically, we propose two different ways of learning the neural similarity: static NSL and dynamic NSL. Interestingly, dynamic neural similarity makes the CNN become a dynamic inference network. By regularizing the bilinear matrix, NSL can be viewed as learning the shape of kernel and the similarity measure simultaneously.

Our paper is accepted to NeurIPS 2019. The full paper is available at arXiv and here

Citation

If you find our work useful in your research, please consider to cite:

@InProceedings{LiuNIPS19,
  title={Neural Similarity Learning},
  author={Liu, Weiyang and Liu, Zhen and Rehg, James and Song, Le},
  booktitle={NeurIPS},
  year={2019}
}

Requirements

  1. Python 3.7
  2. TensorFlow (Tested on version 1.14)
  3. numpy

Usage

Part 1.1: Clone the repositary

  • Clone the repositary.

    git clone https://github.com/wy1iu/NSL.git

Part 1.2: Download the CIFAR-10/100 data

  • Run the bash script.
    ./dataset_setup.sh

Part 2: Image Classification on CIFAR-10/100

  • Training NSL on CIFAR-10 (e.g. dynamic neural similarity network with DNS)

    # $NSL_ROOT is the directory for this repository
    cd $NSL_ROOT/nsl_image_recog/experiments_cifar10/dynamic_dns/
    python train.py
  • To train the other models CIFAR-10, change the foler to the corresponding one.

  • Training NSL on CIFAR-100 (e.g. dynamic neural similarity network with DNS)

    cd $NSL_ROOT/nsl_image_recog/experiments_cifar100/dynamic_dns/
    python train.py
  • Best-performing model: NSL with full SphereNet as the neural similarity predictor

    cd $NSL_ROOT/nsl_image_recog/nsl_fspherenet/
    python train_nsl_fs.py

Part 3: Global Neural Similarity (Self-attention SphereNet)

  • We implement a self-attention SphereNet as an example of global neural similarity (described in Appendix B of our paper).
    cd $NSL_ROOT/nsl_global_ns
    python train_sa.py
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].