当前位置: 首页 > news >正文

黄陂区建设局网站手机端店铺装修

黄陂区建设局网站,手机端店铺装修,wordpress邮箱功能不安全,柳州关键词优化网站问题描述#xff1a; 在训练模型的过程中#xff0c;出现 clip_image_processor 无法处理数据的问题#xff0c;说明数据集中很可能出现了脏数据。本文使用的数据为 LAION-Aesthetics-V2-6.5plus#xff0c;从 https://dagshub.com/DagsHub-Datasets/LAION-Aesthetics-V2-…问题描述 在训练模型的过程中出现 clip_image_processor 无法处理数据的问题说明数据集中很可能出现了脏数据。本文使用的数据为 LAION-Aesthetics-V2-6.5plus从 https://dagshub.com/DagsHub-Datasets/LAION-Aesthetics-V2-6.5plus 上下载的。 Traceback (most recent call last): ...File /xxx/check_train_data.py, line 69, in __getitem__raise e # Re-raise the exception to halt the training process^^^^^^^File /xxx/check_train_data.py, line 64, in __getitem__clip_image self.clip_image_processor(imagesraw_image, return_tensorspt).pixel_values^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File /xxx/lib/python3.12/site-packages/transformers/image_processing_utils.py, line 41, in __call__return self.preprocess(images, **kwargs)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File /xxx/lib/python3.12/site-packages/transformers/models/clip/image_processing_clip.py, line 341, in preprocessself.normalize(imageimage, meanimage_mean, stdimage_std, input_data_formatinput_data_format)File /xxx/lib/python3.12/site-packages/transformers/image_processing_utils.py, line 111, in normalizereturn normalize(^^^^^^^^^^File /xxx/lib/python3.12/site-packages/transformers/image_transforms.py, line 392, in normalizeraise ValueError(fmean must have {num_channels} elements if it is an iterable, got {len(mean)}) ValueError: mean must have 1 elements if it is an iterable, got 3解决方案 将原代码的 clip_image self.clip_image_processor 修改为 try、except 来找到导致报错的图片。将加载数据的代码部分拎出并遍历一遍。 # read imageraw_image Image.open(os.path.join(self.image_root_path, image_file))image self.transform(raw_image.convert(RGB))# clip_image self.clip_image_processor(imagesraw_image, return_tensorspt).pixel_valuestry:clip_image self.clip_image_processor(imagesraw_image, return_tensorspt).pixel_valuesprint(fimage_file_{idx} processed with clip_image_processor: {image_file})except Exception as e:print(fError processing image_file_{idx}: {image_file})print(e)raise e # Re-raise the exception to halt the training process最终卡在 4235 附近的图片通过肉眼观察发现 4236 是图片空的手动删除 4236 图片以及对应的 json 文本后便可正常训练️
http://www.hkea.cn/news/14379367/

相关文章:

  • 成都网站制作公司科蓝唐山免费做网站
  • 网站中的宣传册翻页动画怎么做郑州软件开发学校
  • 如何评价伊利集团网站建设网站开发招聘名称
  • 北京网站设计推荐柚米制作论坛做网站
  • joomla! 1.5 网站建设基础教程 :宁皓网软件开发工具包英文缩写
  • 建设网站怎样分配给用户空间营销手机都有什么功能啊
  • 租用的网站空间的缺点wordpress标题设置
  • 个人网站建设策划书怎么写谷歌seo排名公司
  • 家具建设企业网站怎么做阿里巴巴网站
  • 商务网站建设心得体会wordpress中设置
  • 芜湖市建设办网站中天建设集团坑人吗
  • 网站视频弹窗广告代码哪个公司的app软件定制
  • 上上佳食品 网站建设自媒体wordpress主题
  • 软件产品如何做网站推广深圳大腕互联网站建设
  • 哪里有好网站设计软件实施工资一般多少
  • 婚恋网站排名如何制作手机网页
  • wordpress怎么修改语言设置用什么程序做网站最好优化
  • 上海 网站工作室山东高阳建设公司网站
  • pa66用途障车做网站专门做娱乐场所的设计网站
  • 网站名字备案HTML可以做彩票网站吗
  • 只有一个页面的网站怎么做重庆市建设工程质量监督信息网
  • 建网站有什么用承德在线招聘
  • 做淘客的网站有哪些电子商务网站建设及管理
  • 微擎怎么做网站人力招聘网站建设的简要任务执行书
  • 个人做门户网站郴州新网官网
  • 开发网站语言必应网站收录提交入口
  • 上海外贸企业拼多多关键词怎么优化
  • 电商网站服务排名o2o医药电商平台有哪些
  • wx网站开发成都的网站
  • 网站制作导航栏怎么做免费网站下载大全