File tree Expand file tree Collapse file tree 4 files changed +41
-124
lines changed Expand file tree Collapse file tree 4 files changed +41
-124
lines changed Original file line number Diff line number Diff line change 81
81
"cell_type" : " code" ,
82
82
"execution_count" : 4 ,
83
83
"id" : " 72532ef2-a67c-401a-b142-18ce4cfd5816" ,
84
- "metadata" : {},
84
+ "metadata" : {
85
+ "lines_to_next_cell" : 2
86
+ },
85
87
"outputs" : [
86
88
{
87
89
"data" : {
102
104
{
103
105
"cell_type" : " markdown" ,
104
106
"id" : " 44c56935-93c6-49dc-806b-e1f9b1eb2fa1" ,
105
- "metadata" : {},
107
+ "metadata" : {
108
+ "lines_to_next_cell" : 2
109
+ },
106
110
"source" : [
107
111
" ## シグモイド関数"
108
112
]
111
115
"cell_type" : " code" ,
112
116
"execution_count" : 5 ,
113
117
"id" : " 0d9f86ce-e5de-4b24-b990-14b312c15571" ,
114
- "metadata" : {},
118
+ "metadata" : {
119
+ "lines_to_next_cell" : 2
120
+ },
115
121
"outputs" : [
116
122
{
117
123
"data" : {
139
145
{
140
146
"cell_type" : " markdown" ,
141
147
"id" : " 7340a733-51b5-4727-b528-a0e705c375fd" ,
142
- "metadata" : {},
148
+ "metadata" : {
149
+ "lines_to_next_cell" : 2
150
+ },
143
151
"source" : [
144
152
" ## tanh 関数"
145
153
]
148
156
"cell_type" : " code" ,
149
157
"execution_count" : 6 ,
150
158
"id" : " c620306d-eee4-429a-8162-81efa16fcb19" ,
151
- "metadata" : {},
159
+ "metadata" : {
160
+ "lines_to_next_cell" : 2
161
+ },
152
162
"outputs" : [
153
163
{
154
164
"data" : {
178
188
{
179
189
"cell_type" : " markdown" ,
180
190
"id" : " 01d51d5f-8efc-4dd9-889f-0fdf8770c8b1" ,
181
- "metadata" : {},
191
+ "metadata" : {
192
+ "lines_to_next_cell" : 2
193
+ },
182
194
"source" : [
183
195
" ## ReLU 関数"
184
196
]
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ def visualize(
62
62
# %% [markdown]
63
63
# ## シグモイド関数
64
64
65
+
65
66
# %%
66
67
def sigmoid_function (x ):
67
68
return 1.0 / (1.0 + np .exp (- x ))
@@ -77,6 +78,7 @@ def sigmoid_function(x):
77
78
# %% [markdown]
78
79
# ## tanh 関数
79
80
81
+
80
82
# %%
81
83
def tanh_function (x ):
82
84
return (np .exp (x ) - np .exp (- x )) / (
@@ -94,6 +96,7 @@ def tanh_function(x):
94
96
# %% [markdown]
95
97
# ## ReLU 関数
96
98
99
+
97
100
# %%
98
101
def relu_function (x ):
99
102
return np .maximum (0 , x )
Original file line number Diff line number Diff line change 22
22
# ## 準備
23
23
24
24
# %%
25
- # !pip install py-img-gen
25
+ # !pip install -qq py-img-gen
26
26
27
27
# %%
28
28
import warnings
183
183
# %% [markdown]
184
184
# ### CFG の実行関数の定義
185
185
186
+
186
187
# %%
187
188
def classifier_free_guidance (
188
189
cond_noise_pred : torch .Tensor ,
You can’t perform that action at this time.
0 commit comments