Skip to content

Commit 742bab0

Browse files
committed
update
1 parent 41187c9 commit 742bab0

File tree

4 files changed

+41
-124
lines changed

4 files changed

+41
-124
lines changed

notebooks/2-2_activation-function.ipynb

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@
8181
"cell_type": "code",
8282
"execution_count": 4,
8383
"id": "72532ef2-a67c-401a-b142-18ce4cfd5816",
84-
"metadata": {},
84+
"metadata": {
85+
"lines_to_next_cell": 2
86+
},
8587
"outputs": [
8688
{
8789
"data": {
@@ -102,7 +104,9 @@
102104
{
103105
"cell_type": "markdown",
104106
"id": "44c56935-93c6-49dc-806b-e1f9b1eb2fa1",
105-
"metadata": {},
107+
"metadata": {
108+
"lines_to_next_cell": 2
109+
},
106110
"source": [
107111
"## シグモイド関数"
108112
]
@@ -111,7 +115,9 @@
111115
"cell_type": "code",
112116
"execution_count": 5,
113117
"id": "0d9f86ce-e5de-4b24-b990-14b312c15571",
114-
"metadata": {},
118+
"metadata": {
119+
"lines_to_next_cell": 2
120+
},
115121
"outputs": [
116122
{
117123
"data": {
@@ -139,7 +145,9 @@
139145
{
140146
"cell_type": "markdown",
141147
"id": "7340a733-51b5-4727-b528-a0e705c375fd",
142-
"metadata": {},
148+
"metadata": {
149+
"lines_to_next_cell": 2
150+
},
143151
"source": [
144152
"## tanh 関数"
145153
]
@@ -148,7 +156,9 @@
148156
"cell_type": "code",
149157
"execution_count": 6,
150158
"id": "c620306d-eee4-429a-8162-81efa16fcb19",
151-
"metadata": {},
159+
"metadata": {
160+
"lines_to_next_cell": 2
161+
},
152162
"outputs": [
153163
{
154164
"data": {
@@ -178,7 +188,9 @@
178188
{
179189
"cell_type": "markdown",
180190
"id": "01d51d5f-8efc-4dd9-889f-0fdf8770c8b1",
181-
"metadata": {},
191+
"metadata": {
192+
"lines_to_next_cell": 2
193+
},
182194
"source": [
183195
"## ReLU 関数"
184196
]

notebooks/3-4_classifier-free-guidance.ipynb

Lines changed: 18 additions & 117 deletions
Large diffs are not rendered by default.

scripts/2-2_activation-function.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def visualize(
6262
# %% [markdown]
6363
# ## シグモイド関数
6464

65+
6566
# %%
6667
def sigmoid_function(x):
6768
return 1.0 / (1.0 + np.exp(-x))
@@ -77,6 +78,7 @@ def sigmoid_function(x):
7778
# %% [markdown]
7879
# ## tanh 関数
7980

81+
8082
# %%
8183
def tanh_function(x):
8284
return (np.exp(x) - np.exp(-x)) / (
@@ -94,6 +96,7 @@ def tanh_function(x):
9496
# %% [markdown]
9597
# ## ReLU 関数
9698

99+
97100
# %%
98101
def relu_function(x):
99102
return np.maximum(0, x)

scripts/3-4_classifier-free-guidance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# ## 準備
2323

2424
# %%
25-
# !pip install py-img-gen
25+
# !pip install -qq py-img-gen
2626

2727
# %%
2828
import warnings
@@ -183,6 +183,7 @@
183183
# %% [markdown]
184184
# ### CFG の実行関数の定義
185185

186+
186187
# %%
187188
def classifier_free_guidance(
188189
cond_noise_pred: torch.Tensor,

0 commit comments

Comments
 (0)