警告:この API は非推奨であり、置き換えが安定した後の TensorFlow の将来のバージョンでは削除される予定です。
EagerSession.DevicePlacementPolicy
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
特定のデバイス上で操作を実行しようとしたが、一部の入力テンソルがそのデバイス上にない場合にどのように動作するかを制御します。
継承されたメソッド
クラスjava.lang.Enumから最終整数 | 比較先(E arg0) |
整数 | 比較先(オブジェクト arg0) |
最終ブール値 | 等しい(オブジェクト arg0) |
最終クラス<E> | getDeclaringClass () |
最終整数 | ハッシュコード() |
最後の文字列 | 名前() |
最終整数 | 序数() |
弦 | toString () |
static <T extends Enum<T>> T | valueOf (Class<T> arg0, String arg1) |
クラスjava.lang.Objectからブール値 | 等しい(オブジェクト arg0) |
最終クラス<?> | getクラス() |
整数 | ハッシュコード() |
最後の空白 | 通知する() |
最後の空白 | すべて通知() |
弦 | toString () |
最後の空白 | wait (long arg0, int arg1) |
最後の空白 | 待機(長い引数0) |
最後の空白 | 待って() |
インターフェース java.lang.Comparable から抽象整数 | CompareTo (E は Enum<E> arg0 を拡張) |
列挙値
public static Final EagerSession.DevicePlacementPolicy EXPLICIT
間違ったデバイス上で入力テンソルを使用して操作を実行すると失敗します。
パブリック静的最終 EagerSession.DevicePlacementPolicy SILENT
テンソルをサイレントにコピーします。コピーが完了するまで操作がブロックされるため、パフォーマンスが低下します。これはデフォルトの配置ポリシーです。
パブリック静的最終 EagerSession.DevicePlacementPolicy SILENT_FOR_INT32
int32 テンソルをサイレントにコピーしますが、他の dtype はコピーしない配置ポリシー。
public static Final EagerSession.DevicePlacementPolicy警告
テンソルを適切なデバイスにコピーしますが、警告がログに記録されます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],[],null,["# EagerSession.DevicePlacementPolicy\n\npublic static final enum **EagerSession.DevicePlacementPolicy** \nControls how to act when we try to run an operation on a given device but some input tensors\nare not on that device. \n\n### Inherited Methods\n\nFrom class java.lang.Enum \n\n|----------------------------------|---------------------------------------|\n| final int | compareTo(E arg0) |\n| int | compareTo(Object arg0) |\n| final boolean | equals(Object arg0) |\n| final Class\\\u003cE\\\u003e | getDeclaringClass() |\n| final int | hashCode() |\n| final String | name() |\n| final int | ordinal() |\n| String | toString() |\n| static \\\u003cT extends Enum\\\u003cT\\\u003e\\\u003e T | valueOf(Class\\\u003cT\\\u003e arg0, String arg1) |\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface java.lang.Comparable \n\n|--------------|-------------------------------------|\n| abstract int | compareTo(E extends Enum\\\u003cE\\\u003e arg0) |\n\nEnum Values\n-----------\n\n#### public static final EagerSession.DevicePlacementPolicy\n**EXPLICIT**\n\nRunning operations with input tensors on the wrong device will fail. \n\n#### public static final EagerSession.DevicePlacementPolicy\n**SILENT**\n\nSilently copy the tensor, which has a performance cost since the operation will be blocked\ntill the copy completes. This is the default placement policy. \n\n#### public static final EagerSession.DevicePlacementPolicy\n**SILENT_FOR_INT32**\n\nPlacement policy which silently copies int32 tensors but not other dtypes. \n\n#### public static final EagerSession.DevicePlacementPolicy\n**WARN**\n\nCopy the tensor to the right device but log a warning."]]