← 开源
lucidrains

lambda-networks

Implementation of LambdaNetworks, a new approach to image recognition that reaches SOTA with less compute

Model DevelopmentArchitecturePython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
1.53k
Star
155
Fork
+2
本周
2
贡献者
创建于 2020-10-08 · 更新于 2026-10-13 · 今日第 10081 名
主要开发者

lucidrains/lambda-networks 排名第 10,081,有 1,530 个星标。

同类别比较

lucidrains/lambda-networks 排名第 10,081,此处有 8 个同类条目;sail-sg/envpool 排名第 10,082。

同类别比较
名称排名指标
gpleiss/efficient_densenet_pytorch10,063
语言:
Python
星标数:
1,536
分叉数:
320
简介:
A memory-efficient implementation of DenseNets
AxeldeRomblay/MLBox10,068
语言:
Python
星标数:
1,534
分叉数:
272
简介:
MLBox is a powerful Automated Machine Learning python library.
yongzhuo/nlp_xiaojiang10,072
语言:
Python
星标数:
1,533
分叉数:
389
简介:
自然语言处理(nlp),小姜机器人(闲聊检索式chatbot),BERT句向量-相似度(Sentence Similarity),XLNET句向量-相似度(text xlnet embedding),文本分类(Text classification), 实体提取(ner,bert+bilstm+crf),数据增强(text augment, data enhance),同义句同义词生成,句子主干提取(mainpart),中文汉语短文本相似度,文本特征工程,keras-http-service调用
declare-lab/conv-emotion10,078
语言:
Python
星标数:
1,531
分叉数:
341
简介:
This repo contains implementation of different architectures for emotion recognition in conversations.
sail-sg/envpool10,082
语言:
C++
星标数:
1,530
分叉数:
145
简介:
C++-based high-performance parallel environment execution engine (vectorized env) for general RL environments.
interpretml/DiCE10,088
语言:
Python
星标数:
1,528
分叉数:
235
简介:
Generate Diverse Counterfactual Explanations for any machine learning model.
huggingface/pytorch-openai-transformer-lm10,095
语言:
Python
星标数:
1,525
分叉数:
284
简介:
🐥A PyTorch implementation of OpenAI's finetuned transformer language model with a script to import the weights pre-trained by OpenAI
Tencent/TFace10,097
语言:
Python
星标数:
1,524
分叉数:
253
简介:
A trusty face analysis research platform developed by Tencent Youtu Lab
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Architecture
关键词Computer vision
星标数1,530
分叉数155
贡献者2
创建日期2020-10-08
更新日期2026-10-13
1 天星标数0
7 天星标数2
排名10,081
上次排名10,099
排名变化18
7 天星标排名8,029
上次 7 天星标排名8,065
7 天星标排名变化36
总星标排名7,973
上次总星标排名7,961
总星标排名变化-12
国家USA
README 摘录

Lambda Networks - Pytorch Implementation of λ Networks, a new approach to image recognition that reaches SOTA on ImageNet. The new method utilizes λ layer, which captures interactions by transforming contexts into linear functions, termed lambdas, and applying these linear functions to each input separately. Yannic Kilcher's paper review Install Usage Global context Localized context For fun, you can also import this as follows Tensorflow / Keras version Shinel94 has added a Keras implementation! It won't be officially supported in this repository, so either

copy / paste the code under or make sure to install and before running the following.

常见问题

记录了多少星标和分叉?

lucidrains/lambda-networks 有 1,530 个星标和 155 个分叉。

仓库排名是多少?

lucidrains/lambda-networks 排名第 10,081。

记录的语言和类别是什么?

lucidrains/lambda-networks 有 1,530 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

lucidrains/lambda-networks 与 sail-sg/envpool 比较,后者排名第 10,082,有 1,530 个星标。

README

Lambda Networks - Pytorch

Implementation of λ Networks, a new approach to image recognition that reaches SOTA on ImageNet. The new method utilizes λ layer, which captures interactions by transforming contexts into linear functions, termed lambdas, and applying these linear functions to each input separately.

Yannic Kilcher's paper review

Install

$ pip install lambda-networks

Usage

Global context

import torch
from lambda_networks import LambdaLayer

layer = LambdaLayer(
    dim = 32,       # channels going in
    dim_out = 32,   # channels out
    n = 64,         # size of the receptive window - max(height, width)
    dim_k = 16,     # key dimension
    heads = 4,      # number of heads, for multi-query
    dim_u = 1       # 'intra-depth' dimension
)

x = torch.randn(1, 32, 64, 64)
layer(x) # (1, 32, 64, 64)

Localized context

import torch
from lambda_networks import LambdaLayer

layer = LambdaLayer(
    dim = 32,
    dim_out = 32,
    r = 23,         # the receptive field for relative positional encoding (23 x 23)
    dim_k = 16,
    heads = 4,
    dim_u = 4
)

x = torch.randn(1, 32, 64, 64)
layer(x) # (1, 32, 64, 64)

For fun, you can also import this as follows

from lambda_networks import λLayer

Tensorflow / Keras version

Shinel94 has added a Keras implementation! It won't be officially supported in this repository, so either copy / paste the code under ./lambda_networks/tfkeras.py or make sure to install tensorflow and keras before running the following.

import tensorflow as tf
from lambda_networks.tfkeras import LambdaLayer

layer = LambdaLayer(
    dim_out = 32,
    r = 23,
    dim_k = 16,
    heads = 4,
    dim_u = 1
)

x = tf.random.normal((1, 64, 64, 16)) # channel last format
layer(x) # (1, 64, 64, 32)

Citations

@inproceedings{
    anonymous2021lambdanetworks,
    title={LambdaNetworks: Modeling long-range Interactions without Attention},
    author={Anonymous},
    booktitle={Submitted to International Conference on Learning Representations},
    year={2021},
    url={https://openreview.net/forum?id=xTJEN-ggl1b},
    note={under review}
}
排名相邻
同类项目