Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
tensor akışı:: işlem:: Degradeyi Önle
#include <array_ops.h>
Bir degrade istendiğinde hatayı tetikleyen bir kimlik işlemi.
Özet
Bir grafikte yürütüldüğünde, bu işlem giriş tensörünü olduğu gibi çıkarır.
Degradeleri hesaplamak için operasyonlar oluştururken, TensorFlow degrade sistemi bu operasyonun degradesini aramaya çalışırken bir hata döndürecektir çünkü bu işlev için hiçbir degradenin kaydedilmesi gerekmez. Bu operasyon, bazı köşe durumlarında ince hataların uygulanmamış degradeleri sessizce döndürmesini önlemek için mevcuttur.
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- giriş: herhangi bir tensör.
İsteğe bağlı özellikler (bkz. Attrs
):
- mesaj: Herhangi biri bu işlemi farklılaştırmaya çalıştığında hata mesajı yazdırılacaktır.
İade:
Genel statik işlevler |
---|
Message (StringPiece x) | |
Genel özellikler
Kamu işlevleri
düğüm
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operatör::tensorflow::Çıktı
operator::tensorflow::Output() const
Genel statik işlevler
Mesaj
Attrs Message(
StringPiece x
)
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::PreventGradient Class Reference\n\ntensorflow::ops::PreventGradient\n================================\n\n`#include \u003carray_ops.h\u003e`\n\nAn identity op that triggers an error if a gradient is requested.\n\nSummary\n-------\n\nWhen executed in a graph, this op outputs its input tensor as-is.\n\nWhen building ops to compute gradients, the TensorFlow gradient system will return an error when trying to lookup the gradient of this op, because no gradient must ever be registered for this function. This op exists to prevent subtle bugs from silently returning unimplemented gradients in some corner cases.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: any tensor.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/prevent-gradient/attrs#structtensorflow_1_1ops_1_1_prevent_gradient_1_1_attrs)):\n\n- message: Will be printed in the error when anyone tries to differentiate this operation.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): the same input tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [PreventGradient](#classtensorflow_1_1ops_1_1_prevent_gradient_1a0b9966e0dc996fe02edcdfc60584d033)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input)` ||\n| [PreventGradient](#classtensorflow_1_1ops_1_1_prevent_gradient_1ae19edcd4e91e9dc4bc39684dfd8cfa74)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, const `[PreventGradient::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/prevent-gradient/attrs#structtensorflow_1_1ops_1_1_prevent_gradient_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_prevent_gradient_1a9b6a878872406f077395172368112563) | [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_prevent_gradient_1a4c8f001d1b1f87090e63ed718977d582) | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_prevent_gradient_1a039d4498a7fd50b84e4246f6adab399e)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_prevent_gradient_1a20ebe0054ff4d6f2d7bb35242547bb7b)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_prevent_gradient_1a2e068c7e108d2325da28edbfd997cd02)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| [Message](#classtensorflow_1_1ops_1_1_prevent_gradient_1a5e4b110d0c0f8f247fd80301b88df40d)`(StringPiece x)` | [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/prevent-gradient/attrs#structtensorflow_1_1ops_1_1_prevent_gradient_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::PreventGradient::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/prevent-gradient/attrs) | Optional attribute setters for [PreventGradient](/versions/r2.0/api_docs/cc/class/tensorflow/ops/prevent-gradient#classtensorflow_1_1ops_1_1_prevent_gradient). |\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### PreventGradient\n\n```gdscript\n PreventGradient(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input\n)\n``` \n\n### PreventGradient\n\n```gdscript\n PreventGradient(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n const PreventGradient::Attrs & attrs\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``` \n\nPublic static functions\n-----------------------\n\n### Message\n\n```text\nAttrs Message(\n StringPiece x\n)\n```"]]