Tensorflow 2.0 dataset and dataloader

后端 未结 2 1442
轮回少年
轮回少年 2021-02-20 17:30

I am a pytorch user, and I am used to the data.dataset and data.dataloader api in pytorch. I am trying to build a same model with tensorflow 2.0, and I wonder whether there is a

2条回答
  •  后悔当初
    2021-02-20 17:41

    I am not familiar with Pytorch but Tensorflow implements the Keras API which has the Sequence class that is:

    Base object for fitting to a sequence of data, such as a dataset

    https://www.tensorflow.org/api_docs/python/tf/keras/utils/Sequence

    This class contains getitem for an index.

提交回复
热议问题