此问题在此处已有答案:
Split train data to train and validation by using tensorflow_datasets.load (TF 2.1)(2个答案)
两年前就关门了。
位于Link:https://www.tensorflow.org/tutorials/images/transfer_learning(raw_train, raw_validation, raw_test), metadata = tfds.load( 'cats_vs_dogs', split=['train[:80%]', 'train[80%:90%]', 'train[90%:]'], with_info=True, as_supervised=True, )
错误原因KeyError: "Invalid split train[:80%]. Available splits are: ['train']"
1条答案
按热度按时间h5qlskok1#
试试这个代码我们可以在TF 2中将其拆分为: