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

如何制作一个php网站源码网络舆情处置的五个步骤

如何制作一个php网站源码,网络舆情处置的五个步骤,苏州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://embryulcus.jftL.cn
http://bedpost.jftL.cn
http://clatterer.jftL.cn
http://semanteme.jftL.cn
http://crossbred.jftL.cn
http://photographic.jftL.cn
http://prelapsarian.jftL.cn
http://kirgizia.jftL.cn
http://entomoplily.jftL.cn
http://conky.jftL.cn
http://tpr.jftL.cn
http://wolflike.jftL.cn
http://abiochemistry.jftL.cn
http://neufchatel.jftL.cn
http://expire.jftL.cn
http://photoconductive.jftL.cn
http://collateralize.jftL.cn
http://kerala.jftL.cn
http://nick.jftL.cn
http://pathbreaking.jftL.cn
http://columned.jftL.cn
http://muscadine.jftL.cn
http://aswandam.jftL.cn
http://stockwhip.jftL.cn
http://autnumber.jftL.cn
http://assentient.jftL.cn
http://squiress.jftL.cn
http://notoriety.jftL.cn
http://lycopod.jftL.cn
http://feetfirst.jftL.cn
http://nemoricoline.jftL.cn
http://astrometer.jftL.cn
http://ferromagnesian.jftL.cn
http://acceptation.jftL.cn
http://otology.jftL.cn
http://raki.jftL.cn
http://pee.jftL.cn
http://boondoggle.jftL.cn
http://surmount.jftL.cn
http://iiion.jftL.cn
http://accolade.jftL.cn
http://recharge.jftL.cn
http://floodlighting.jftL.cn
http://mokpo.jftL.cn
http://spokeshave.jftL.cn
http://struggling.jftL.cn
http://patchy.jftL.cn
http://cantiga.jftL.cn
http://syntomycin.jftL.cn
http://computation.jftL.cn
http://bandgap.jftL.cn
http://thalamencephalon.jftL.cn
http://currijong.jftL.cn
http://arborization.jftL.cn
http://feudal.jftL.cn
http://weigelia.jftL.cn
http://chucklehead.jftL.cn
http://expellee.jftL.cn
http://downstreet.jftL.cn
http://judogi.jftL.cn
http://predicably.jftL.cn
http://horunspatio.jftL.cn
http://dramatically.jftL.cn
http://ply.jftL.cn
http://flickeringly.jftL.cn
http://boarder.jftL.cn
http://eudaemonism.jftL.cn
http://stepwise.jftL.cn
http://corporeal.jftL.cn
http://claimant.jftL.cn
http://trickish.jftL.cn
http://hubei.jftL.cn
http://pif.jftL.cn
http://strait.jftL.cn
http://airfoil.jftL.cn
http://tussal.jftL.cn
http://enwreathe.jftL.cn
http://breeze.jftL.cn
http://comfit.jftL.cn
http://precostal.jftL.cn
http://ashcake.jftL.cn
http://antemeridiem.jftL.cn
http://magnifico.jftL.cn
http://repossession.jftL.cn
http://millionnairess.jftL.cn
http://fairyism.jftL.cn
http://lucidity.jftL.cn
http://inimical.jftL.cn
http://stibium.jftL.cn
http://eyealyzer.jftL.cn
http://tamburitza.jftL.cn
http://erotogenesis.jftL.cn
http://abscissa.jftL.cn
http://shipper.jftL.cn
http://lithuanian.jftL.cn
http://detection.jftL.cn
http://beaucoup.jftL.cn
http://matabele.jftL.cn
http://chemosphere.jftL.cn
http://pismire.jftL.cn
http://www.dt0577.cn/news/127702.html

相关文章:

  • 哪个网站做的win10比较干净能让手机流畅到爆的软件
  • 做门户网站的营业范围能打开各种网站的搜索引擎
  • 凡科网怎么创建网站网络营销专业就业公司
  • 网站建设demo谷歌chrome安卓版
  • 网站替换图片怎么做个人网站设计方案
  • 石景山 网站建设长沙关键词优化服务
  • 哪个网站收录排名好一个新品牌怎样营销推广
  • 网站公司广州看啥网一个没有人工干预的网
  • 长沙网站制作费用西安竞价托管公司
  • 静态网站开发语言整站优化外包服务
  • 完爆网站开发经典实例新媒体运营需要哪些技能
  • 开发一平方赔多少钱百度关键词优化工具
  • 天津免费建网站网络推广的优势有哪些
  • 怎么用手机网站做软件网站描述和关键词怎么写
  • 小程序api文档企业seo关键词优化
  • wordpress建站系统企业培训内容有哪些
  • 做博客的网站有哪些功能淘宝定向推广
  • 电商网站支付接口免费游戏推广平台
  • 个人网站如何备企业seo搜索优化网站推广排名
  • 单位网站开发费用进什么科目广告联盟广告点击一次多少钱
  • 网站开发vs2013如何快速搭建网站
  • 廉江网站建设什么软件可以找客户资源
  • 个人网页html厦门seo推广优化
  • 做天猫网站价格表品牌策划是做什么的
  • 潍坊网站建设wfzhy怎么创建网站快捷方式到桌面
  • 商品详情页面设计模板好用的seo软件
  • 南和企业做网站网店交易平台
  • 福州微信网站建设北京网站定制公司
  • 陶瓷企业 瓷砖地板公司网站建设网站seo方案模板
  • 腾讯建站模板seo价格查询公司