Enable MNIST Multiple 'return' as Unit Test (#25556)

Enable multiple "return" statement in MNIST as Unit test in dy2stat.
fix_copy_if_different
Huihuang Zheng 5 years ago committed by GitHub
parent 1a4a4219cb
commit 0d8545f818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -108,12 +108,9 @@ class MNIST(fluid.dygraph.Layer):
loss = fluid.layers.cross_entropy(x, label)
avg_loss = fluid.layers.mean(loss)
# TODO: Uncomment code after "return" statement can be transformed correctly.
# return x, acc, avg_loss
# else:
# return x
return x, acc, avg_loss
else:
return x
def inference(self, inputs):
x = self._simple_img_conv_pool_1(inputs)

Loading…
Cancel
Save