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

fix CIFAR MNIST UCIHousing dataset. test=develop #27368

Merged
merged 3 commits into from
Sep 21, 2020

Conversation

heavengate
Copy link
Contributor

@heavengate heavengate commented Sep 16, 2020

PR types

Bug fixes

PR changes

APIs

Describe

  • remove chw_format of paddle.vision.datasets.MNIST
  • paddle.vision.datasets.MNIST paddle.vision.datasets.CIFAR10 paddle.vision.datasets.CIFAR100 output image in [C, H, W] format
  • remove normalization transform in paddle.vision.datasets.MNIST
  • paddle.text.datasets.UCIHousing return numpy ndarray with dtype as float32

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@heavengate heavengate changed the title fix CIFAR & MNIST dataset. test=develop fix CIFAR MNIST UCIHousing dataset. test=develop Sep 16, 2020
qingqing01
qingqing01 previously approved these changes Sep 17, 2020
@@ -103,7 +103,8 @@ def _load_data(self, feature_num=14, ratio=0.8):

def __getitem__(self, idx):
data = self.data[idx]
return np.array(data[:-1]), np.array(data[-1:])
return np.array(data[:-1]).astype('float32'), \
np.array(data[-1:]).astype('float32')

Choose a reason for hiding this comment

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

这个建议使用 paddle.get_default_dtype() 来获取默认转换的数据dtype,这样用户在使用set_default_dtype调整了默认dtype后也会保证使用体验一致。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks!

Copy link

@saxon-zh saxon-zh left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@heavengate heavengate merged commit f3b4a64 into PaddlePaddle:develop Sep 21, 2020
@heavengate heavengate deleted the fix_dataset branch September 21, 2020 03:23
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

Successfully merging this pull request may close these issues.

None yet

4 participants