mirror of
https://github.com/huggingface/transformers.git
synced 2025-10-20 17:13:56 +08:00
[examples] fix do_reduce_labels argument for run_semantic_segmentation_no_trainer (#39322)
* no use do_reduce_labels argument in model * use do_reducer_labels in AutoImageProcessor
This commit is contained in:
@ -324,13 +324,12 @@ def main():
|
||||
args.model_name_or_path, id2label=id2label, label2id=label2id, trust_remote_code=args.trust_remote_code
|
||||
)
|
||||
image_processor = AutoImageProcessor.from_pretrained(
|
||||
args.model_name_or_path, trust_remote_code=args.trust_remote_code
|
||||
args.model_name_or_path, trust_remote_code=args.trust_remote_code, do_reduce_labels=args.do_reduce_labels
|
||||
)
|
||||
model = AutoModelForSemanticSegmentation.from_pretrained(
|
||||
args.model_name_or_path,
|
||||
config=config,
|
||||
trust_remote_code=args.trust_remote_code,
|
||||
do_reduce_labels=args.do_reduce_labels,
|
||||
)
|
||||
|
||||
# Define transforms to be applied to each image and target.
|
||||
|
Reference in New Issue
Block a user