Skip to content

Fix learning rate error and improve parameters of SPSA#765

Open
lockwo wants to merge 7 commits into
tensorflow:masterfrom
lockwo:master
Open

Fix learning rate error and improve parameters of SPSA#765
lockwo wants to merge 7 commits into
tensorflow:masterfrom
lockwo:master

Conversation

@lockwo
Copy link
Copy Markdown
Contributor

@lockwo lockwo commented Apr 23, 2023

I was encountering some poor performance and was able to track down the cause to 2 places. 1) there was a mistake in the scaling of the new learning rate (it should be 10%, not 1% of total iterations), and 2) a better default learning rate is 0.05 * ((maxiter * 0.1) + 1) ** alpha (per https://docs.pennylane.ai/en/stable/_modules/pennylane/optimize/spsa.html#SPSAOptimizer), which for default values is actually 0.05 * ((200 * 0.1) + 1) ** 0.602 = 0.31.

@mhucka mhucka added the kind/bug-report Something doesn't seem to work label Dec 2, 2024
@mhucka mhucka changed the title Improved parameters of SPSA Fix learning rate error and improve parameters of SPSA Jun 5, 2026
@mhucka mhucka self-assigned this Jun 5, 2026
@mhucka mhucka added area/performance Involves performance problems or improvements priority/before-0.7.7 To be done before releasing TFQ version 0.7.7 labels Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/performance Involves performance problems or improvements kind/bug-report Something doesn't seem to work priority/before-0.7.7 To be done before releasing TFQ version 0.7.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants