首页 PaddleCV 帖子详情
PaddleClas中drop_last....
收藏
快速回复
PaddleCV 问答图像分类 798 7
PaddleClas中drop_last....
收藏
快速回复
PaddleCV 问答图像分类 798 7

paddleclas中drop_last在哪儿设置???

文档我已经看臭了。

ppcls.data.reader.SampleNumException: 
Error: The number of the whole data (47) is smaller than the batch_size (128), and drop_last is turnning on, so nothing will feed in program, Terminated now. Please reset batch_size to a smaller number or feed more data!




0
收藏
回复
全部评论(7)
时间顺序
AIStudio810259
#2 回复于2020-12

我是哭了

 

    if params['mode'] != "test" and len(full_lines) < batch_size:
        raise SampleNumException('', len(full_lines), batch_size)
class SampleNumException(Exception):
    """
    SampleNumException
    """

    def __init__(self, message='', sample_num=0, batch_size=1):
        message += "\nError: The number of the whole data ({}) " \
            "is smaller than the batch_size ({}), and drop_last " \
            "is turnning on, so nothing  will feed in program, " \
            "Terminated now. Please reset batch_size to a smaller " \
            "number or feed more data!".format(sample_num, batch_size)
        super(SampleNumException, self).__init__(message)
0
回复
AIStudio810259
#3 回复于2020-12

我哭了

0
回复
AIStudio810258
#4 回复于2020-12

我找找

0
回复
AIStudio810258
#5 回复于2020-12

翻代码找到是在 reader.py 脚本里

0
回复
AIStudio810258
#6 回复于2020-12

代码默认训练时就drop last

0
回复
AIStudio810258
#7 回复于2020-12
我是哭了   [代码] [代码]

你再往下翻翻,就找到了~~

0
回复
AIStudio810258
#8 回复于2020-12

我在这个项目整理了paddleclas的文件布局:

https://aistudio.baidu.com/aistudio/projectdetail/1308952

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户