Code Monkey home page Code Monkey logo

Comments (2)

SuryanarayanaY avatar SuryanarayanaY commented on May 7, 2024

Hi @miticollo ,

Colab usually filters Info and Warning logs. That's why you are not able to see it. The warning descriptions states if you are caching and then applying take() or batch() method. If your dataset is large caching the whole dataset might be a problem and can leads to truncation of dataset. This is just a warning to inform the user about possible data truncation.

Since tf.data.Dataset is a pipeline object you can first batching the dataset and then caching.

dataset = tf.data.Dataset.from_tensor_slices((X_valid, y_valid))
dataset = dataset.map(lambda x, y: (x, y), num_parallel_calls=tf.data.AUTOTUNE)
dataset = dataset.batch(32)
dataset = dataset.cache()
dataset = dataset.prefetch(buffer_size=tf.data.AUTOTUNE)
dataset = dataset.apply(tf.data.experimental.prefetch_to_device(device="/gpu:0"))

from tensorflow.

miticollo avatar miticollo commented on May 7, 2024

I tried to reduce dataset to 64 bytes and 70 bytes (I hope I did it correctly).
Then I run the notebook different times and I noticed that the warning sometimes appears and sometimes not.
I don't know why, could be an issue?

Anyway these are outputs from 6 sequential runs (every time I turned off and then on the IPython runtime):

  • 1: the warning appears twice.
  • 2: the warning appears only in the second case.
  • 3: see case 2.
  • 4: see case 2.
  • 5: see case 2.
  • 6: see case 1.

from tensorflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.