← 开源
Mikoto10032

AutomaticWeightedLoss

Multi-task learning using uncertainty to weigh losses for scene geometry and semantics, Auxiliary Tasks in Multi-task Learning

Model DevelopmentArchitecturePython
在 GitHub 打开
增长势头
+124 小时新增 Star+0.2%
650
Star
85
Fork
+0
本周
1
贡献者
创建于 2020-06-07 · 更新于 2026-10-16 · 今日第 6516 名
主要开发者

Mikoto10032/AutomaticWeightedLoss 排名第 6,516,有 650 个星标。

同类别比较

Mikoto10032/AutomaticWeightedLoss 排名第 6,516,此处有 8 个同类条目;pliang279/MultiBench 排名第 6,509。

同类别比较
名称排名指标
BrainCog-X/Brain-Cog6,496
语言:
Python
星标数:
662
分叉数:
110
简介:
Brain-inspired Cognitive Intelligence Engine (BrainCog) is a brain-inspired spiking neural network based platform for Brain-inspired Artificial Intelligence and simulating brains at multiple scales. The long term goal of BrainCog is to provide a comprehensive theory and system to decode the mechanisms and principles of human intelligence and its evolution, and develop artificial brains for brain-inspired conscious living AI in future Human-AI symbiotic Society.
Zielon/MICA6,499
语言:
Python
星标数:
660
分叉数:
97
简介:
MICA - Towards Metrical Reconstruction of Human Faces [ECCV2022]
facebookresearch/Ego4d6,508
语言:
Jupyter Notebook
星标数:
654
分叉数:
66
简介:
Ego4d dataset repository. Download the dataset, visualize, extract features & example usage of the dataset
pliang279/MultiBench6,509
语言:
HTML
星标数:
654
分叉数:
101
简介:
[NeurIPS 2021] Multiscale Benchmarks for Multimodal Representation Learning
gregversteeg/corex_topic6,524
语言:
Python
星标数:
647
分叉数:
117
简介:
Hierarchical unsupervised and semi-supervised topic models for sparse count data with CorEx
redai-studio/Relax6,525
语言:
Python
星标数:
647
分叉数:
180
简介:
An Asynchronous Reinforcement Learning Engine for Omni-Modal Post-Training at Scale
pymc-devs/pytensor6,526
语言:
Python
星标数:
646
分叉数:
222
简介:
PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
mahmoodlab/TRIDENT6,533
语言:
Python
星标数:
644
分叉数:
146
简介:
Toolkit for large-scale whole-slide image processing.
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Architecture
星标数650
分叉数85
贡献者1
创建日期2020-06-07
更新日期2026-10-16
1 天星标数1
7 天星标数0
排名6,516
上次排名15,327
排名变化8,811
7 天星标排名15,022
上次 7 天星标排名17,738
7 天星标排名变化2,716
总星标排名15,755
上次总星标排名15,752
总星标排名变化-3
国家China
README 摘录

AutomaticWeightedLoss A PyTorch implementation of Liebel L, Körner M. Auxiliary tasks in multi-task learning[J]. The above paper improves the paper "Multi-task learning using uncertainty to weigh losses for scene geometry and semantics" to avoid the loss of becoming negative during training. Requirements Python PyTorch How to Train with Your Model Clone the repository Create an AutomaticWeightedLoss module Create an optimizer to learn weight coefficients A complete example Something to Say Actually, it is not always effective

, but I hope it can help you.

常见问题

记录了多少星标和分叉?

Mikoto10032/AutomaticWeightedLoss 有 650 个星标和 85 个分叉。

仓库排名是多少?

Mikoto10032/AutomaticWeightedLoss 排名第 6,516。

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

Mikoto10032/AutomaticWeightedLoss 有 650 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

Mikoto10032/AutomaticWeightedLoss 与 pliang279/MultiBench 比较,后者排名第 6,509,有 654 个星标。

README

AutomaticWeightedLoss

A PyTorch implementation of Liebel L, Körner M. Auxiliary tasks in multi-task learning[J]. arXiv preprint arXiv:1805.06334, 2018.

The above paper improves the paper "Multi-task learning using uncertainty to weigh losses for scene geometry and semantics" to avoid the loss of becoming negative during training.

Requirements

  • Python
  • PyTorch

How to Train with Your Model

  • Clone the repository
git clone git@github.com:Mikoto10032/AutomaticWeightedLoss.git
  • Create an AutomaticWeightedLoss module
from AutomaticWeightedLoss import AutomaticWeightedLoss

awl = AutomaticWeightedLoss(2)	# we have 2 losses
loss1 = 1
loss2 = 2
loss_sum = awl(loss1, loss2)
  • Create an optimizer to learn weight coefficients
from torch import optim

model = Model()
optimizer = optim.Adam([
                {'params': model.parameters()},
                {'params': awl.parameters(), 'weight_decay': 0}	
            ])
  • A complete example
from torch import optim
from AutomaticWeightedLoss import AutomaticWeightedLoss

model = Model()

awl = AutomaticWeightedLoss(2)	# we have 2 losses
loss_1 = ...
loss_2 = ...

# learnable parameters
optimizer = optim.Adam([
                {'params': model.parameters()},
                {'params': awl.parameters(), 'weight_decay': 0}
            ])

for i in range(epoch):
    for data, label1, label2 in data_loader:
        # forward
        pred1, pred2 = Model(data)	
        # calculate losses
        loss1 = loss_1(pred1, label1)
        loss2 = loss_2(pred2, label2)
        # weigh losses
        loss_sum = awl(loss1, loss2)
        # backward
        optimizer.zero_grad()
        loss_sum.backward()
        optimizer.step()

Something to Say

Actually, it is not always effective, but I hope it can help you.

排名相邻
同类项目