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

新网网站空间到期停了 咋续费面包店网站建设论文

新网网站空间到期停了 咋续费,面包店网站建设论文,站内seo是什么意思,网站备案最新备案号问题描述: 在训练模型的过程中,出现 clip_image_processor 无法处理数据的问题,说明数据集中很可能出现了脏数据。本文使用的数据为 LAION-Aesthetics-V2-6.5plus,从 https://dagshub.com/DagsHub-Datasets/LAION-Aesthetics-V2-…

问题描述:

  1. 在训练模型的过程中,出现 clip_image_processor 无法处理数据的问题,说明数据集中很可能出现了脏数据。
  2. 本文使用的数据为 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(images=raw_image, return_tensors="pt").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(image=image, mean=image_mean, std=image_std, input_data_format=input_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(f"mean 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

解决方案:

  1. 将原代码的 clip_image = self.clip_image_processor 修改为 try、except 来找到导致报错的图片。
  2. 将加载数据的代码部分拎出,并遍历一遍。
 # 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(images=raw_image, return_tensors="pt").pixel_valuestry:clip_image = self.clip_image_processor(images=raw_image, return_tensors="pt").pixel_valuesprint(f'image_file_{idx} processed with clip_image_processor: {image_file}')except Exception as e:print(f'Error processing image_file_{idx}: {image_file}')print(e)raise e  # Re-raise the exception to halt the training process
  1. 最终卡在 4235 附近的图片,通过肉眼观察,发现 4236 是图片空的😂
  2. 手动删除 4236 图片以及对应的 json 文本后便可正常训练!🏋️
    在这里插入图片描述
http://www.yayakq.cn/news/646346/

相关文章:

  • 十大网站建设公司排名天眼查网站建设公司
  • 阿里云能放企业网站吗企业门为什么要建设门户网站
  • 网站建设答辩问题汕头各类免费建站
  • seo网站优化师自学编程从哪里开始学
  • 手机搭建网站教程视频教程什么是sem
  • 怎么选择昆明网站建设高新网页设计报价
  • 专做投放广告网站怎么建设一个自己的网站
  • 中山哪家建网站好福建seo关键词优化外包
  • 电商网站推广怎么做自己做网站好还是购买网站好
  • 佛山大型网站建设佛山网站建设 奇锐科技
  • g3云网站谷歌seo视频教程
  • 怎么样建立自己的网站做内销的网站推荐
  • 视频模板网站推荐平面设计手机作图软件
  • 谁帮助汉字叔叔做网站wordpress广告最后加载
  • seo学院百度seo查询工具
  • vs网站模态框怎么做企业建设门户网站的目的
  • 崆峒区建设局网站安卓盒子+做网站
  • 美食网站开发前期准备注册城乡规划师成绩查询
  • 个人网站域名名称大全域名备案 个人 网站基本信息查询
  • 网站建设交付形式深圳外贸公司多吗
  • 高清网站建设的好处app网站建设公司
  • 手机网站怎么建立哈尔滨快速网站排名
  • 东莞便宜做网站wordpress小工具文本加图片代码
  • 网站的建设成本上海在线
  • 成品动漫和视频网站入口网站建设的基础知识与维护
  • 网站页眉设计湖北三丰建设集团股份网站
  • 做游戏网站选服务器网站建设前台与后台最新技术
  • 网站程序预装中山外贸网站建设价格
  • 设计logo网站有哪些免费系统软件
  • 做网站的空间在哪买西安手机网站案例