Open xiejiachen opened 4 years ago
Do you run it in interactive mode such as jupyter notebook or ipython? By default, progrmas of OneFlow can only be started as scripts in "lazy mode" like this:
python mlp_mnist.py
If you insist on running OneFlow code in interactive mode, insert the following code at the beginning,
flow.enable_eager_execution(True)
so that run OneFlow prgrams in "eager mode".
"Eager mode" is experimental and on the way to be improved.
Same code works at [eager mode].
Do you run it in interactive mode such as jupyter notebook or ipython? By default, progrmas of OneFlow can only be started as scripts in "lazy mode" like this:
python mlp_mnist.py
If you insist on running OneFlow code in interactive mode, insert the following code at the beginning,
flow.enable_eager_execution(True)
so that run OneFlow prgrams in "eager mode".
"Eager mode" is experimental and on the way to be improved.
That problems is not caused by ipython core, you can also try that with the codes I given in terminal.
@lixinqi Report from slack, this condition is because of laze mode design. Is that better to give a warning such as
If you wanna try to call global_function again, please clear session firstly or use eager mode?
@lixinqi Report from slack, this condition is because of laze mode design. Is that better to give a warning such as
If you wanna try to call global_function again, please clear session firstly or use eager mode?
Agree
Error Report as