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。
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.
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}
}