Skip to content

Commit

Permalink
fix Flatten api test=develop
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoxuefeng6 committed Aug 17, 2020
1 parent f8ca720 commit af08500
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions python/paddle/fluid/dygraph/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -3226,19 +3226,6 @@ def __init__(self, start_axis=1, stop_axis=-1):
self.stop_axis = stop_axis

def forward(self, input):
out = self._helper.create_variable_for_type_inference(input.dtype)
x_shape = self._helper.create_variable_for_type_inference(input.dtype)

if in_dygraph_mode():
dy_out, _ = core.ops.flatten_contiguous_range(
input, 'start_axis', self.start_axis, 'stop_axis',
self.stop_axis)
return dy_out
self._helper.append_op(
type="flatten_contiguous_range",
inputs={"X": input},
outputs={"Out": out,
"XShape": x_shape},
attrs={"start_axis": self.start_axis,
"stop_axis": self.stop_axis})
out = paddle.tensor.manipulation.flatten(
input, start_axis=self.start_axis, stop_axis=self.stop_axis)
return out

1 comment on commit af08500

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on af08500 Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️ CI failures summary

🔍 Commit ID: af08500 contains failed CI.

Please sign in to comment.