Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix undefined-variable-1 #33425

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/paddle/fluid/net_drawer.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ def parse_graph(program, graph, var_dict, **kwargs):

def draw_graph(startup_program, main_program, **kwargs):
if "graph_attr" in kwargs:
GRAPH_STYLE.update(kwargs[graph_attr])
GRAPH_STYLE.update(kwargs["graph_attr"])
if "node_attr" in kwargs:
OP_STYLE.update(kwargs[node_attr])
OP_STYLE.update(kwargs["node_attr"])
if "edge_attr" in kwargs:
VAR_STYLE.update(kwargs[edge_attr])
VAR_STYLE.update(kwargs["edge_attr"])

graph_id = unique_id()
filename = kwargs.get("filename")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from functools import reduce
from paddle.fluid.dygraph import declarative, to_variable
from paddle.fluid.dygraph import Embedding, Layer, Linear
from paddle.static import Variable


class EmbeddingLayer(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from functools import reduce
import paddle
from paddle.static import Variable


class EmbeddingLayer(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import gast
import inspect
import numpy as np
import paddle
import paddle.fluid as fluid
import unittest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import numpy as np
import paddle.fluid.core as core
from paddle.fluid.tests.unittests.op_test import OpTest
from paddle import enable_static

from paddle.fluid.tests.unittests.test_conv2d_transpose_op import conv2dtranspose_forward_naive, TestConv2DTransposeOp

Expand Down
1 change: 1 addition & 0 deletions python/paddle/text/datasets/wmt14.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import tarfile
import numpy as np
import gzip
import six

from paddle.io import Dataset
import paddle.compat as cpt
Expand Down