Python 3.x 我正试图在catvsdog数据集上使用tensorflow网站上的mobileNet实现迁移学习
训练分类器需要花费太多的时间,因此我们是否可以实现重复功能,以便重复数据集的次数Python 3.x 我正试图在catvsdog数据集上使用tensorflow网站上的mobileNet实现迁移学习,python-3.x,tensorflow,Python 3.x,Tensorflow,训练分类器需要花费太多的时间,因此我们是否可以实现重复功能,以便重复数据集的次数 def repeat(train_batches, count=5): # return train_batches,count for image_batch, label_batch in train_batches.take(1): #pass break # image_batch.shape # repeat(train_bat
def repeat(train_batches, count=5):
# return train_batches,count
for image_batch, label_batch in train_batches.take(1):
#pass
break
# image_batch.shape
# repeat(train_batches,2)
#def repeat(train_batches, count):
# return train_batches,count
image_batch.shape
不知道你的问题是什么。你正在使用for循环并在之后使用break?在“for”循环中,如果我们写pass,它将花费太多的时间来通过它,因此我写了break,所以它只需要1批数据集来训练,我们也可以使用repeat函数,来重复训练数据集的次数,现在我的问题是如何实现repeat函数?这里提到: