Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 我正试图在catvsdog数据集上使用tensorflow网站上的mobileNet实现迁移学习_Python 3.x_Tensorflow - Fatal编程技术网

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函数?这里提到: