Fix some Bugs of Undefined Variable #33488
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Bug fixes
PR changes
Others
Describe
Line129: undefine variable name self,
use 'cls' instead of 'self'.
Line 57, 59, 97, 99, 203, 211: undefine variable name adaptive_start_index,
Line 58, 60, 98, 100, 204, 212: undefine variable name adaptive_end_index,
from test_pool2d_op import adaptive_start_index, adaptive_end_index
Line 1472: Undefined variable 'value',
use 'num_trainers' instead of 'value'.
Line 1926: Undefined variable 'warnings',
import warnings
Line 5687: Undefined variable 'fluid'
import paddle.fluid as fluid
Line 313: Undefined variable 'item'
use 'model_np' instead of 'item'.
Line 317: Undefined variable 'item'
use 'model_np' instead of 'item'.
Line 387: Undefined variable 'distutils'
from distutils.util import strtobool
Line 178: Undefined variable 'persistables'
use 'persistables' instead of 'persitables' in line 148
Line 194, 195: Undefined variable 'six'
import six
Line 158: Undefined variable 'enable_static'
from paddle import enable_static
Line 1352: Undefined variable 'loss'
use 'metrics' instead of 'loss'
Line 81: Undefined variable 'outputs'
remove return outputs