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 preprocess
self.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 normalize
return normalize(^^^^^^^^^^
File "/xxx/lib/python3.12/site-packages/transformers/image_transforms.py", line 392,in normalize
raise 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
# read image
raw_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_values
print(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
动画按顺序播放
在线使用:https://v.le5le.com/
如案例所示,通过连线去串联一组动画图元,动画按照顺序向后执行。 ① 首先给每个图元都配置动画,注意这里的动画播放次数一定要配置有限个(这里配置都是1次࿰…