datasets icon indicating copy to clipboard operation
datasets copied to clipboard

tfds.show_examples rows parameter does work properly

Open nirajkale opened this issue 6 years ago • 3 comments

Short description Say I have loaded a dataset using tfds & if I use tfds.show_exmaples to plot examples. the argument for number of rows does not work properly. It seems to plot rows = argument value +1 (seems like its following 0 based index or something). I know its nitpicking at this moment but thought I'll report it anyway. Thanks

Environment information I'm using google colab

  • Operating System: google colab
  • Python version: 3.6.8
  • tensorflow-datasets/tfds-nightly version: tensorflow-datasets 2.1.0
  • tensorflow/tensorflow-gpu/tf-nightly/tf-nightly-gpu version: tensorflow 2.1

Reproduction instructions

import tensorflow_datasets as tfds
ds_train, info_train = tfds.load('cats_vs_dogs', split= 'train[:80%]', with_info= True)
tfds.show_examples(info_train, ds_train, rows= 1, cols = 3)

This seems to show 2 rows instead of 1

Expected behavior This should have printed only 1 row

nirajkale avatar Apr 04 '20 10:04 nirajkale

@nirajkale Please see this colab notebook its been updated but pip package you are using is not been updated yet. So for correct use you can clone repo.

Edit: You can use tfds-nightly, pip install tfds-nightly it also works fine see colab

Eshan-Agarwal avatar Apr 04 '20 11:04 Eshan-Agarwal

@nirajkale please close this issue you can use tfds-nightly

Eshan-Agarwal avatar Apr 05 '20 04:04 Eshan-Agarwal

Thanks will use tfds-nightly

nirajkale avatar Apr 05 '20 13:04 nirajkale