Buckets:
| # UNet1DModel | |
| [UNet](https://huggingface.co/papers/1505.04597)モデルは、Ronneberger らによって生体医用画像のセグメンテーションのために最初に提案されましたが、入力と同じサイズの画像を出力するため、🤗 Diffusers でも広く使用されています。実際の拡散プロセスを担うため、拡散システムにおいて最も重要なコンポーネントの一つです。🤗 Diffusers には、次元数や条件付きモデルかどうかによって異なる複数の UNet モデルのバリアントがあります。これは 1 次元の UNet モデルです。 | |
| 論文の抄録は以下の通りです: | |
| *深層ネットワークの成功した学習には、数千枚のラベル付き訓練サンプルが必要であるという点について、大きな合意がある。本論文では、データ拡張を強力に活用することで、利用可能なラベル付きサンプルをより効率的に使用できるネットワークと学習戦略を提案する。このアーキテクチャは、コンテキストを捉えるための縮小パスと、正確な位置特定を可能にする対称的な拡大パスで構成される。このようなネットワークは、非常に少ない画像からエンドツーエンドで学習でき、電子顕微鏡スタックにおける神経構造のセグメンテーションに関するISBIチャレンジにおいて、従来の最良手法(スライディングウィンドウ畳み込みネットワーク)を上回ることを示す。透過光顕微鏡画像(位相差およびDIC)で学習した同じネットワークを用いて、ISBIセルトラッキングチャレンジ2015では、これらのカテゴリで大幅な差をつけて優勝した。さらに、このネットワークは高速である。最新のGPUでは、512x512画像のセグメンテーションに1秒未満しかかからない。完全な実装(Caffeベース)と学習済みネットワークは、http://lmb.informatik.uni-freiburg.de/people/ronneber/u-net で入手できる。* | |
| ## UNet1DModel[[diffusers.UNet1DModel]] | |
| #### diffusers.UNet1DModel[[diffusers.UNet1DModel]] | |
| ```python | |
| diffusers.UNet1DModel(sample_size: int = 65536, sample_rate: int | None = None, in_channels: int = 2, out_channels: int = 2, extra_in_channels: int = 0, time_embedding_type: str = 'fourier', time_embedding_dim: int | None = None, flip_sin_to_cos: bool = True, use_timestep_embedding: bool = False, freq_shift: float = 0.0, down_block_types: tuple[str, ...] = ('DownBlock1DNoSkip', 'DownBlock1D', 'AttnDownBlock1D'), up_block_types: tuple[str, ...] = ('AttnUpBlock1D', 'UpBlock1D', 'UpBlock1DNoSkip'), mid_block_type: str = 'UNetMidBlock1D', out_block_type: str = None, block_out_channels: tuple[int, ...] = (32, 32, 64), act_fn: str = None, norm_num_groups: int = 8, layers_per_block: int = 1, downsample_each_block: bool = False) | |
| ``` | |
| [ソース](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unets/unet_1d.py#L40) | |
| **パラメータ:** | |
| sample_size (`int`, *任意*) : サンプルのデフォルトの長さ。ランタイムで適応可能である必要があります。 | |
| in_channels (`int`、*任意*、デフォルトは 2) : 入力サンプルのチャネル数。 | |
| out_channels (`int`、*任意*、デフォルトは 2) : 出力のチャネル数。 | |
| extra_in_channels (`int`、*任意*、デフォルトは 0) : 最初のダウンブロックの入力に追加されるチャネル数。モデルが当初設計されたものよりもチャネル数が多い入力データを扱う場合に便利です。 | |
| time_embedding_type (`str`、*任意*、デフォルトは `"fourier"`) : 使用する時間埋め込みの種類。 | |
| freq_shift (`float`、*任意*、デフォルトは 0.0) : フーリエ時間埋め込み用の周波数シフト。 | |
| flip_sin_to_cos (`bool`、*任意*、デフォルトは`False`) : Fourier 時間埋め込みにおいて sin を cos に反転させるかどうか。 | |
| down_block_types (`tuple[str]`、*任意*、デフォルトは`("DownBlock1DNoSkip", "DownBlock1D", "AttnDownBlock1D")`) : ダウンサンプルブロックのタイプのタプル。 | |
| up_block_types (`tuple[str]`, *任意*, デフォルトは `("AttnUpBlock1D", "UpBlock1D", "UpBlock1DNoSkip")`) : アップサンプリングブロックのタイプのタプル。 | |
| block_out_channels (`tuple[int]`、*任意*、デフォルトは`(32, 32, 64)`) : ブロックの出力チャネル数を表すタプル。 | |
| mid_block_type (`str`、*任意*、デフォルトは`"UNetMidBlock1D"`) : UNetの中央部分のブロックタイプ。 | |
| out_block_type (`str`、*任意*、デフォルトは`None`) : UNet の任意の出力処理ブロック。 | |
| act_fn (`str`、*任意*、デフォルトは`None`) : UNetブロックで使用する任意の活性化関数。 | |
| norm_num_groups (`int`、*optional*、デフォルトは 8) : 正規化のグループ数です。 | |
| layers_per_block (`int`、*任意*、デフォルトは 1) : ブロックあたりのレイヤー数。 | |
| downsample_each_block (`int`、*任意*、デフォルトは`False`) : アップサンプリングなしで UNet を使用する実験的な機能です。 | |
| ノイズ付きサンプルとタイムステップを受け取り、サンプル形状の出力を返す1次元UNetモデルです。 | |
| このモデルは [ModelMixin](/docs/diffusers/main/ja/api/models/overview#diffusers.ModelMixin) を継承しています。すべてのモデルに実装されている汎用的なメソッド(ダウンロードや保存など)については、スーパークラスのドキュメントを参照してください。 | |
| #### forward[[diffusers.UNet1DModel.forward]] | |
| ```python | |
| forward(sample: Tensor, timestep: typing.Union[torch.Tensor, float, int], return_dict: bool = True) | |
| ``` | |
| [ソース](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unets/unet_1d.py#L205) | |
| **パラメータ:** | |
| sample (`torch.Tensor`) : 以下の形状 `(batch_size, num_channels, sample_size)` を持つノイズ付き入力テンソル。 | |
| timestep (`torch.Tensor` または `float` または `int`) : 入力からノイズを除去するためのタイムステップ数。 | |
| return_dict (`bool`、*任意*、デフォルトは`True`) : プレーンなタプルではなく、[UNet1DOutput](/docs/diffusers/main/ja/api/models/unet#diffusers.models.unets.unet_1d.UNet1DOutput)を返すかどうか。 | |
| **戻り値:** [UNet1DOutput](/docs/diffusers/main/ja/api/models/unet#diffusers.models.unets.unet_1d.UNet1DOutput) または `tuple` | |
| `return_dict` が True の場合、[UNet1DOutput](/docs/diffusers/main/ja/api/models/unet#diffusers.models.unets.unet_1d.UNet1DOutput) が返され、それ以外の場合は、最初の要素がサンプルテンソルである `tuple` が返されます。 | |
| [UNet1DModel](/docs/diffusers/main/ja/api/models/unet#diffusers.UNet1DModel)のforwardメソッド。 | |
| ## UNet1DOutput[[diffusers.models.unets.unet_1d.UNet1DOutput]] | |
| #### diffusers.models.unets.unet_1d.UNet1DOutput[[diffusers.models.unets.unet_1d.UNet1DOutput]] | |
| ```python | |
| diffusers.models.unets.unet_1d.UNet1DOutput(sample: Tensor) | |
| ``` | |
| [ソース](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unets/unet_1d.py#L28) | |
| **パラメータ:** | |
| sample (`torch.Tensor`、shape `(batch_size, num_channels, sample_size)`) : モデルの最終層から出力される隠れ状態です。 | |
| [UNet1DModel](/docs/diffusers/main/ja/api/models/unet#diffusers.UNet1DModel)の出力。 | |
Xet Storage Details
- Size:
- 7.62 kB
- Xet hash:
- 6f1f76c9d557c5bf86545018cf60604b647f342b39622e84dba806cc7b80ffc5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.