mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 15:52:49 +08:00
modify some bug
Former-commit-id: 593b7b004df74bd24361c9883401a656c08fb589
This commit is contained in:
parent
5062ee547e
commit
5d03ac642d
@ -91,6 +91,8 @@ def preprocess_supervised_dataset(
|
|||||||
model_inputs["labels"].append(labels)
|
model_inputs["labels"].append(labels)
|
||||||
if processor is not None and "images" in examples:
|
if processor is not None and "images" in examples:
|
||||||
pixel_values = processor.image_processor(examples["images"][0], return_tensors="pt")["pixel_values"][0]
|
pixel_values = processor.image_processor(examples["images"][0], return_tensors="pt")["pixel_values"][0]
|
||||||
|
if "pixel_values" not in model_inputs:
|
||||||
|
model_inputs["pixel_values"] = []
|
||||||
model_inputs["pixel_values"].append(pixel_values)
|
model_inputs["pixel_values"].append(pixel_values)
|
||||||
return model_inputs
|
return model_inputs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user