Skip to content

Commit

Permalink
Merge pull request #216 from kozistr/feature/wsam-optimizer
Browse files Browse the repository at this point in the history
[Feature] Implement WSAM optimizer
  • Loading branch information
kozistr authored Dec 10, 2023
2 parents b6efbbc + 47aac68 commit 5ff4dee
Show file tree
Hide file tree
Showing 10 changed files with 551 additions and 306 deletions.
133 changes: 67 additions & 66 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/optimizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@
:docstring:
:members:

::: pytorch_optimizer.WSAM
:docstring:
:members:

::: pytorch_optimizer.Yogi
:docstring:
:members:
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ keywords = [
"DAdaptSGD", "DAdaptLion", "DiffGrad", "Fromage", "Gravity", "GSAM", "LARS", "Lamb", "Lion", "LOMO", "Lookahead",
"MADGRAD", "MSVAG", "Nero", "NovoGrad", "PAdam", "PCGrad", "PID", "PNM", "Prodigy", "QHAdam", "QHM", "RAdam",
"Ranger", "Ranger21", "RotoGrad", "SAM", "SGDP", "Shampoo", "ScalableShampoo", "SGDW", "SignSGD", "SM3", "SopihaH",
"SRMM", "SWATS", "Tiger", "Yogi", "BCE", "BCEFocal", "Focal", "FocalCosine", "SoftF1", "Dice", "LDAM", "Jaccard",
"Bi-Tempered", "Tversky", "FocalTversky", "LovaszHinge", "bitsandbytes",
"SRMM", "SWATS", "Tiger", "WSAM", "Yogi", "BCE", "BCEFocal", "Focal", "FocalCosine", "SoftF1", "Dice", "LDAM",
"Jaccard", "Bi-Tempered", "Tversky", "FocalTversky", "LovaszHinge", "bitsandbytes",
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
Expand Down Expand Up @@ -126,7 +126,6 @@ testpaths = "tests"

[tool.coverage.run]
omit = [
"./pytorch_optimizer/optimizer/gsam.py",
"./pytorch_optimizer/optimizer/rotograd.py",
]

Expand Down
3 changes: 1 addition & 2 deletions pytorch_optimizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
from pytorch_optimizer.optimizer.fromage import Fromage
from pytorch_optimizer.optimizer.gc import centralize_gradient
from pytorch_optimizer.optimizer.gravity import Gravity
from pytorch_optimizer.optimizer.gsam import GSAM
from pytorch_optimizer.optimizer.lamb import Lamb
from pytorch_optimizer.optimizer.lars import LARS
from pytorch_optimizer.optimizer.lion import Lion
Expand All @@ -76,7 +75,7 @@
from pytorch_optimizer.optimizer.ranger import Ranger
from pytorch_optimizer.optimizer.ranger21 import Ranger21
from pytorch_optimizer.optimizer.rotograd import RotoGrad
from pytorch_optimizer.optimizer.sam import SAM
from pytorch_optimizer.optimizer.sam import GSAM, SAM, WSAM
from pytorch_optimizer.optimizer.sgd import ASGD, SGDW, AccSGD, SignSGD
from pytorch_optimizer.optimizer.sgdp import SGDP
from pytorch_optimizer.optimizer.shampoo import ScalableShampoo, Shampoo
Expand Down
227 changes: 0 additions & 227 deletions pytorch_optimizer/optimizer/gsam.py

This file was deleted.

Loading

0 comments on commit 5ff4dee

Please sign in to comment.