---
title: 简介
description: "TensorHolder类用于在Eager Style图构建中表示张量操作。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/atlasgeapi_07_0792.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi_07_0792.html
indexId: f698630503a9401d3f69608d15ab796c82bbde7c0afc3a91400f3e35c41df40872
---
# 简介

TensorHolder类用于在Eager Style图构建中表示张量操作。

- TensorHolder对象不能直接创建，由GraphBuilder操作内部创建。
- TensorHolder在GraphBuilder.build_and_reset()后不能调用setter方法。
- 所有TensorHolder对象自动解析并保持对其GraphBuilder的强引用，以确保底层C++资源在TensorHolder对象仍在使用时保持有效。
