Skip to content

Commit

Permalink
[remove fluid.layers.matmul] remove fluid.layers.matmul in example co…
Browse files Browse the repository at this point in the history
…de (PaddlePaddle#48818)

* replace fluid.layers.matmul in fluid/io.py

* fix doc error in fluid.layers.nn.sampling_id
  • Loading branch information
kangguangli authored Dec 8, 2022
1 parent e6a5486 commit 2083b31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/paddle/fluid/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def save_vars(
data = fluid.layers.data(name="img", shape=[64, 784], append_batch_size=False)
w = paddle.create_parameter(shape=[784, 200], dtype='float32', name='fc_w')
b = paddle.create_parameter(shape=[200], dtype='float32', name='fc_b')
hidden_w = fluid.layers.matmul(x=data, y=w)
hidden_w = paddle.matmul(x=data, y=w)
hidden_b = fluid.layers.elementwise_add(hidden_w, b)
place = fluid.CPUPlace()
exe = fluid.Executor(place)
Expand Down Expand Up @@ -827,7 +827,7 @@ def load_vars(
data = fluid.layers.data(name="img", shape=[64, 784], append_batch_size=False)
w = paddle.create_parameter(shape=[784, 200], dtype='float32', name='fc_w')
b = paddle.create_parameter(shape=[200], dtype='float32', name='fc_b')
hidden_w = fluid.layers.matmul(x=data, y=w)
hidden_w = paddle.matmul(x=data, y=w)
hidden_b = fluid.layers.elementwise_add(hidden_w, b)
place = fluid.CPUPlace()
exe = fluid.Executor(place)
Expand Down Expand Up @@ -1592,7 +1592,7 @@ def load_inference_model(
data = fluid.layers.data(name="img", shape=[64, 784], append_batch_size=False)
w = paddle.create_parameter(shape=[784, 200], dtype='float32')
b = paddle.create_parameter(shape=[200], dtype='float32')
hidden_w = fluid.layers.matmul(x=data, y=w)
hidden_w = paddle.matmul(x=data, y=w)
hidden_b = fluid.layers.elementwise_add(hidden_w, b)
place = fluid.CPUPlace()
exe = fluid.Executor(place)
Expand Down

0 comments on commit 2083b31

Please sign in to comment.