컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: 형태 보장
#include <array_ops.h>
텐서의 모양이 예상되는 모양과 일치하는지 확인합니다.
요약
입력 텐서의 모양이 지정된 모양과 일치하지 않으면 오류가 발생합니다. 그렇지 않으면 입력 텐서를 반환합니다.
인수:
- 범위: 범위 개체
- 입력: 모양을 검증할 텐서입니다.
- 모양: 입력 텐서의 예상되는(부분적으로 지정될 수 있는) 모양입니다.
보고:
-
Output
: 입력 텐서나 값과 모양과 내용이 동일한 텐서입니다.
공개 속성
공공 기능
마디
::tensorflow::Node * node() const
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# tensorflow::ops::EnsureShape Class Reference\n\ntensorflow::ops::EnsureShape\n============================\n\n`#include \u003carray_ops.h\u003e`\n\nEnsures that the tensor's shape matches the expected shape.\n\nSummary\n-------\n\nRaises an error if the input tensor's shape does not match the specified shape. Returns the input tensor otherwise.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: A tensor, whose shape is to be validated.\n- shape: The expected (possibly partially specified) shape of the input tensor.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A tensor with the same shape and contents as the input tensor or value.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [EnsureShape](#classtensorflow_1_1ops_1_1_ensure_shape_1a5eccae9b4752e5ce978003d1413e5c06)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, PartialTensorShape shape)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_ensure_shape_1abc933208d9ec4b02b93fd9fbf992457b) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_ensure_shape_1a3de25be53998f6b3c1fe4f88c0b7f90a) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_ensure_shape_1affd7b08d440e2fcd688949c62b747b6d)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_ensure_shape_1afd5278e7b8083f310fa151d3e6ca6569)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_ensure_shape_1a9ced601bdda49a6b52e0695a81bdee19)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### EnsureShape\n\n```gdscript\n EnsureShape(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n PartialTensorShape shape\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]