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

tensorlayerx.nn.UpSampling2d当data_format="channels_first"和paddle.nn.Upsample输出结果维度不一致 #51

Open
2 tasks
zhxiucui opened this issue Nov 24, 2022 · 0 comments

Comments

@zhxiucui
Copy link

New Issue Checklist

Issue Description

[INSERT DESCRIPTION OF THE PROBLEM]

Reproducible Code

  • Which OS are you using ?
  • Please provide a reproducible code of your issue. Without any reproducible code, you will probably not receive any help.

[INSERT CODE HERE]

# ======================================================== #
###### THIS CODE IS AN EXAMPLE, REPLACE WITH YOUR OWN ######
# ======================================================== #
import os
import paddle
os.environ['TL_BACKEND'] = 'paddle'
import tensorlayerx as tlx

tlx_ni = tlx.nn.Input([4, 32, 50, 50], name='input')
tlx_out = tlx.nn.UpSampling2d(scale=(2, 2), data_format="channels_first")(tlx_ni)
print(f"tlx_out.shape={tlx_out.shape}")

pd_ni = paddle.rand([4, 32, 50, 50], dtype="float32")
pd_out = paddle.nn.Upsample(scale_factor=2, data_format="NCHW")(pd_ni)
print(f"pd_out.shape={pd_out.shape}")

# ======================================================== #
###### THIS CODE IS AN EXAMPLE, REPLACE WITH YOUR OWN ######
# ======================================================== #

输出结果
tlx_out.shape=[4, 32, 64, 100]
pd_out.shape=[4, 32, 100, 100]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant