Thành phần đường ống BulkInferrer TFX
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Thành phần BulkInferrer TFX thực hiện suy luận hàng loạt trên dữ liệu chưa được gắn nhãn. InferenceResult được tạo ( tensorflow_served.apis.prediction_log_pb2.PredictionLog ) chứa các tính năng ban đầu và kết quả dự đoán.
BulkInferrer tiêu thụ:
- Một mô hình được đào tạo ở định dạng SavingModel .
- Các tf.Examples không được gắn nhãn có chứa các tính năng.
- (Tùy chọn) Kết quả xác thực từ thành phần Người đánh giá .
BulkInferrer phát ra:
Sử dụng Thành phần BulkInferrer
Thành phần TFX BulkInferrer được sử dụng để thực hiện suy luận hàng loạt trên các tf.Examples không được gắn nhãn. Nó thường được triển khai sau thành phần Người đánh giá để thực hiện suy luận với một mô hình đã được xác thực hoặc sau thành phần Huấn luyện viên để thực hiện suy luận trực tiếp trên mô hình đã xuất.
Nó hiện đang thực hiện suy luận mô hình trong bộ nhớ và suy luận từ xa. Suy luận từ xa yêu cầu mô hình phải được lưu trữ trên Nền tảng Cloud AI.
Mã điển hình trông như thế này:
bulk_inferrer = BulkInferrer(
examples=examples_gen.outputs['examples'],
model=trainer.outputs['model'],
model_blessing=evaluator.outputs['blessing'],
data_spec=bulk_inferrer_pb2.DataSpec(),
model_spec=bulk_inferrer_pb2.ModelSpec()
)
Thông tin chi tiết hơn có sẵn trong tài liệu tham khảo API BulkInferrer .
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# The BulkInferrer TFX Pipeline Component\n\n\u003cbr /\u003e\n\nThe BulkInferrer TFX component performs batch inference on unlabeled data. The\ngenerated\nInferenceResult([tensorflow_serving.apis.prediction_log_pb2.PredictionLog](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/apis/prediction_log.proto))\ncontains the original features and the prediction results.\n\nBulkInferrer consumes:\n\n- A trained model in [SavedModel](https://www.tensorflow.org/guide/saved_model.md) format.\n- Unlabelled tf.Examples that contain features.\n- (Optional) Validation result from [Evaluator](https://www.tensorflow.org/tfx/guide/evaluator.md) component.\n\nBulkInferrer emits:\n\n- [InferenceResult](https://github.com/tensorflow/tfx/blob/master/tfx/types/standard_artifacts.py)\n\nUsing the BulkInferrer Component\n--------------------------------\n\nA BulkInferrer TFX component is used to perform batch inference on unlabeled\ntf.Examples. It is typically deployed after an\n[Evaluator](https://www.tensorflow.org/tfx/guide/evaluator.md) component to\nperform inference with a validated model, or after a\n[Trainer](https://www.tensorflow.org/tfx/guide/trainer.md) component to directly\nperform inference on exported model.\n\nIt currently performs in-memory model inference and remote inference.\nRemote inference requires the model to be hosted on Cloud AI Platform.\n\nTypical code looks like this: \n\n bulk_inferrer = BulkInferrer(\n examples=examples_gen.outputs['examples'],\n model=trainer.outputs['model'],\n model_blessing=evaluator.outputs['blessing'],\n data_spec=bulk_inferrer_pb2.DataSpec(),\n model_spec=bulk_inferrer_pb2.ModelSpec()\n )\n\nMore details are available in the\n[BulkInferrer API reference](https://www.tensorflow.org/tfx/api_docs/python/tfx/v1/components/BulkInferrer)."]]