question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RuntimeError: Unexpected optimization level 01. Option are '00' '01' '02' '03'

See original GitHub issue

When I made the following changes to the original code and reported this error, I don’t know where the problem occurred. Can you give me some advice? Thank you. model, optimizer = amp.initialize(model, optimizer, opt_level="O1") with amp.scale_loss(loss, optimizer) as scaled_loss: scaled_loss.backward()

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ptrblckcommented, Jun 5, 2019

Hi @wangyingyu, could you check if you are trying to pass the opt_level as two integers (i.e. “zero one” "01") instead of the expected uppercase O letter and 1 ("O1")?

1reaction
thammegowdacommented, Jun 15, 2019

(Glad to find I am not the only one) the names couldn’t get any better than O1, O2, O3 😆! Oh, by the way, that’s not zero😲, it’s the O as in 🍊🤦🏻‍♂️

Suggestion (before moving to pytorch core):

  1. consider aliasing to lowercase o at least that would make it obvious when written like o1, o2, o3
  2. better yet: please alias them level_1, level_2, level_3 or opt_1, opt_2, opt_3

🙏🏼

Read more comments on GitHub >

github_iconTop Results From Across the Web

apex.amp — Apex 0.1.0 documentation - GitHub Pages
apex.amp¶. This page documents the updated API for Amp (Automatic Mixed Precision), a tool to enable Tensor Core-accelerated training in only 3 lines...
Read more >
[Tutorial] GCC Optimization Pragmas
From the official source on GCC pragmas, this pragma allows you to set global optimization flags (specified by option ) for functions that...
Read more >
XL C/C++: Compiler Reference for Little Endian Distributions
This document is for experienced C or C++ developers who have some familiarity with the XL C/C++ compilers or other command-line compilers on...
Read more >
SPEC CPU®2017 Frequently Asked Questions
runcpu.03 Why am I getting errors about libnsl.so.1 ? ... Setting up. Setup.01 ... Miscompare.02 The benchmark took less than 1 second.
Read more >
Aruba Instant 6.4.3.x-4.2 Syslog Messages Reference Guide
Figure 1 Configuring Syslog Server Settings. You can also configure Syslog server details and logging levels by using the command-line Interface (CLI).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found