質問編集履歴
2
初心者ボタン
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
1
HTMLの追加
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
[python]
|
1
|
+
[python]変数名における「:int」の意味がわかりません。
|
body
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# 「:int」の「:」の意味がわかりません。
|
2
2
|
現在github上で公開されているコード内容を追っているのですが、変数の設定において下記の様な表記があります。
|
3
|
+
```html
|
3
|
-
|
4
|
+
n_class:int = 1
|
4
|
-
* h1: Variable = F.leaky_relu(self.conv1(x), negative_slope=0.2)
|
5
5
|
|
6
|
+
h1: Variable = F.leaky_relu(self.conv1(x), negative_slope=0.2)
|
7
|
+
```
|
8
|
+
|
9
|
+
|
6
10
|
お恥ずかしながら変数名の中に「:」を使った表記を見るのは初めてで何を意味しているか理解できておりません。
|
7
11
|
ご教授頂ければ幸いです。
|
8
12
|
|