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

[Dy2St] Enable test_lstm in PIR mode #60343

Merged
Merged
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
4 changes: 2 additions & 2 deletions test/dygraph_to_static/test_lstm.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ def tearDown(self):

def run_lstm(self, to_static):
with enable_to_static_guard(to_static):
paddle.static.default_main_program().random_seed = 1001
paddle.static.default_startup_program().random_seed = 1001
paddle.seed(1001)

net = paddle.jit.to_static(Net(12, 2))
x = paddle.zeros((2, 10, 12))
y = net(x)
return y.numpy()

@test_legacy_and_pt_and_pir
def test_lstm_to_static(self):
dygraph_out = self.run_lstm(to_static=False)
static_out = self.run_lstm(to_static=True)
Expand Down