カウンタ

COUNTER38786

日誌

12345Next
2019/08/22new

8÷2(2+2)をpythonで

Tweet ThisSend to Facebook | by kaizen

適用するルールによって意見は二分 「8÷2(2+2)=」の答えは?

https://news.livedoor.com/article/detail/16867682/?fbclid=IwAR0X6-jUxNWLWaE6RouXezm5mAsOPxK-amkEsp1k5ocln0bSiixUy_WDVbc

適用する言語で、答えはいっぱい。python3では。基本エラー。

$ python3
Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:04:09) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 8÷2(2+2)
  File "<stdin>", line 1
    8÷2(2+2)
      ^
SyntaxError: invalid character in identifier

>>> 8 ÷ 2 (2+2)
  File "<stdin>", line 1
    8 ÷ 2 (2+2)
      ^
SyntaxError: invalid character in identifier
>>> 8 / 2 ( 2 + 2 )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable
>>> 8 / 2 * ( 2 + 2 )
16.0
python2では

$ python2.6
Python 2.6.9 (unknown, Feb  7 2017, 00:08:08) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 8÷2(2+2)
  File "<stdin>", line 1
    8÷2(2+2)
     ^
SyntaxError: invalid syntax
>>> 8 ÷ 2 ( 2 + 2 )
  File "<stdin>", line 1
    8 ÷ 2 ( 2 + 2 )
      ^
SyntaxError: invalid syntax
>>> 8 / 2 ( 2 + 2 )
  File "<stdin>", line 1
    8 / 2 ( 2 + 2 )
              ^
SyntaxError: invalid syntax

>>> 8 / 2 ( 2 + 2 )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable

>>> 8 / 2 * ( 2 + 2 )
16

12:14 | Impressed! | Voted(0) | Comment(0)
2018/09/25

# python train_custom_loop.py

Tweet ThisSend to Facebook | by kaizen
# python train_custom_loop.py 
| epoch 1 |  iter 10 / 10 | loss 1.13
| epoch 2 |  iter 10 / 10 | loss 1.13
| epoch 3 |  iter 10 / 10 | loss 1.12
| epoch 4 |  iter 10 / 10 | loss 1.12
| epoch 5 |  iter 10 / 10 | loss 1.11
| epoch 6 |  iter 10 / 10 | loss 1.14
| epoch 7 |  iter 10 / 10 | loss 1.16
| epoch 8 |  iter 10 / 10 | loss 1.11
| epoch 9 |  iter 10 / 10 | loss 1.12
| epoch 10 |  iter 10 / 10 | loss 1.13
| epoch 11 |  iter 10 / 10 | loss 1.12
| epoch 12 |  iter 10 / 10 | loss 1.11
| epoch 13 |  iter 10 / 10 | loss 1.09
| epoch 14 |  iter 10 / 10 | loss 1.08
| epoch 15 |  iter 10 / 10 | loss 1.04
| epoch 16 |  iter 10 / 10 | loss 1.03
| epoch 17 |  iter 10 / 10 | loss 0.96
| epoch 18 |  iter 10 / 10 | loss 0.92
| epoch 19 |  iter 10 / 10 | loss 0.92
| epoch 20 |  iter 10 / 10 | loss 0.87
| epoch 21 |  iter 10 / 10 | loss 0.85
| epoch 22 |  iter 10 / 10 | loss 0.82
| epoch 23 |  iter 10 / 10 | loss 0.79
| epoch 24 |  iter 10 / 10 | loss 0.78
| epoch 25 |  iter 10 / 10 | loss 0.82
| epoch 26 |  iter 10 / 10 | loss 0.78
| epoch 27 |  iter 10 / 10 | loss 0.76
| epoch 28 |  iter 10 / 10 | loss 0.76
| epoch 29 |  iter 10 / 10 | loss 0.78
| epoch 30 |  iter 10 / 10 | loss 0.75
| epoch 31 |  iter 10 / 10 | loss 0.78
| epoch 32 |  iter 10 / 10 | loss 0.77
| epoch 33 |  iter 10 / 10 | loss 0.77
| epoch 34 |  iter 10 / 10 | loss 0.78
| epoch 35 |  iter 10 / 10 | loss 0.75
| epoch 36 |  iter 10 / 10 | loss 0.74
| epoch 37 |  iter 10 / 10 | loss 0.76
| epoch 38 |  iter 10 / 10 | loss 0.76
| epoch 39 |  iter 10 / 10 | loss 0.73
| epoch 40 |  iter 10 / 10 | loss 0.75
| epoch 41 |  iter 10 / 10 | loss 0.76
| epoch 42 |  iter 10 / 10 | loss 0.76
| epoch 43 |  iter 10 / 10 | loss 0.76
| epoch 44 |  iter 10 / 10 | loss 0.74
| epoch 45 |  iter 10 / 10 | loss 0.75
| epoch 46 |  iter 10 / 10 | loss 0.73
| epoch 47 |  iter 10 / 10 | loss 0.72
| epoch 48 |  iter 10 / 10 | loss 0.73
| epoch 49 |  iter 10 / 10 | loss 0.72
| epoch 50 |  iter 10 / 10 | loss 0.72
| epoch 51 |  iter 10 / 10 | loss 0.72
| epoch 52 |  iter 10 / 10 | loss 0.72
| epoch 53 |  iter 10 / 10 | loss 0.74
| epoch 54 |  iter 10 / 10 | loss 0.74
| epoch 55 |  iter 10 / 10 | loss 0.72
| epoch 56 |  iter 10 / 10 | loss 0.72
| epoch 57 |  iter 10 / 10 | loss 0.71
| epoch 58 |  iter 10 / 10 | loss 0.70
| epoch 59 |  iter 10 / 10 | loss 0.72
| epoch 60 |  iter 10 / 10 | loss 0.70
| epoch 61 |  iter 10 / 10 | loss 0.71
| epoch 62 |  iter 10 / 10 | loss 0.72
| epoch 63 |  iter 10 / 10 | loss 0.70
| epoch 64 |  iter 10 / 10 | loss 0.71
| epoch 65 |  iter 10 / 10 | loss 0.73
| epoch 66 |  iter 10 / 10 | loss 0.70
| epoch 67 |  iter 10 / 10 | loss 0.71
| epoch 68 |  iter 10 / 10 | loss 0.69
| epoch 69 |  iter 10 / 10 | loss 0.70
| epoch 70 |  iter 10 / 10 | loss 0.71
| epoch 71 |  iter 10 / 10 | loss 0.68
| epoch 72 |  iter 10 / 10 | loss 0.69
| epoch 73 |  iter 10 / 10 | loss 0.67
| epoch 74 |  iter 10 / 10 | loss 0.68
| epoch 75 |  iter 10 / 10 | loss 0.67
| epoch 76 |  iter 10 / 10 | loss 0.66
| epoch 77 |  iter 10 / 10 | loss 0.69
| epoch 78 |  iter 10 / 10 | loss 0.64
| epoch 79 |  iter 10 / 10 | loss 0.68
| epoch 80 |  iter 10 / 10 | loss 0.64
| epoch 81 |  iter 10 / 10 | loss 0.64
| epoch 82 |  iter 10 / 10 | loss 0.66
| epoch 83 |  iter 10 / 10 | loss 0.62
| epoch 84 |  iter 10 / 10 | loss 0.62
| epoch 85 |  iter 10 / 10 | loss 0.61
| epoch 86 |  iter 10 / 10 | loss 0.60
| epoch 87 |  iter 10 / 10 | loss 0.60
| epoch 88 |  iter 10 / 10 | loss 0.61
| epoch 89 |  iter 10 / 10 | loss 0.59
| epoch 90 |  iter 10 / 10 | loss 0.58
| epoch 91 |  iter 10 / 10 | loss 0.56
| epoch 92 |  iter 10 / 10 | loss 0.56
| epoch 93 |  iter 10 / 10 | loss 0.54
| epoch 94 |  iter 10 / 10 | loss 0.53
| epoch 95 |  iter 10 / 10 | loss 0.53
| epoch 96 |  iter 10 / 10 | loss 0.52
| epoch 97 |  iter 10 / 10 | loss 0.51
| epoch 98 |  iter 10 / 10 | loss 0.50
| epoch 99 |  iter 10 / 10 | loss 0.48
| epoch 100 |  iter 10 / 10 | loss 0.48
| epoch 101 |  iter 10 / 10 | loss 0.46
| epoch 102 |  iter 10 / 10 | loss 0.45
| epoch 103 |  iter 10 / 10 | loss 0.45
| epoch 104 |  iter 10 / 10 | loss 0.44
| epoch 105 |  iter 10 / 10 | loss 0.44
| epoch 106 |  iter 10 / 10 | loss 0.41
| epoch 107 |  iter 10 / 10 | loss 0.40
| epoch 108 |  iter 10 / 10 | loss 0.41
| epoch 109 |  iter 10 / 10 | loss 0.40
| epoch 110 |  iter 10 / 10 | loss 0.40
| epoch 111 |  iter 10 / 10 | loss 0.38
| epoch 112 |  iter 10 / 10 | loss 0.38
| epoch 113 |  iter 10 / 10 | loss 0.36
| epoch 114 |  iter 10 / 10 | loss 0.37
| epoch 115 |  iter 10 / 10 | loss 0.35
| epoch 116 |  iter 10 / 10 | loss 0.34
| epoch 117 |  iter 10 / 10 | loss 0.34
| epoch 118 |  iter 10 / 10 | loss 0.34
| epoch 119 |  iter 10 / 10 | loss 0.33
| epoch 120 |  iter 10 / 10 | loss 0.34
| epoch 121 |  iter 10 / 10 | loss 0.32
| epoch 122 |  iter 10 / 10 | loss 0.32
| epoch 123 |  iter 10 / 10 | loss 0.31
| epoch 124 |  iter 10 / 10 | loss 0.31
| epoch 125 |  iter 10 / 10 | loss 0.30
| epoch 126 |  iter 10 / 10 | loss 0.30
| epoch 127 |  iter 10 / 10 | loss 0.28
| epoch 128 |  iter 10 / 10 | loss 0.28
| epoch 129 |  iter 10 / 10 | loss 0.28
| epoch 130 |  iter 10 / 10 | loss 0.28
| epoch 131 |  iter 10 / 10 | loss 0.27
| epoch 132 |  iter 10 / 10 | loss 0.27
| epoch 133 |  iter 10 / 10 | loss 0.27
| epoch 134 |  iter 10 / 10 | loss 0.27
| epoch 135 |  iter 10 / 10 | loss 0.27
| epoch 136 |  iter 10 / 10 | loss 0.26
| epoch 137 |  iter 10 / 10 | loss 0.26
| epoch 138 |  iter 10 / 10 | loss 0.26
| epoch 139 |  iter 10 / 10 | loss 0.25
| epoch 140 |  iter 10 / 10 | loss 0.24
| epoch 141 |  iter 10 / 10 | loss 0.24
| epoch 142 |  iter 10 / 10 | loss 0.25
| epoch 143 |  iter 10 / 10 | loss 0.24
| epoch 144 |  iter 10 / 10 | loss 0.24
| epoch 145 |  iter 10 / 10 | loss 0.23
| epoch 146 |  iter 10 / 10 | loss 0.24
| epoch 147 |  iter 10 / 10 | loss 0.23
| epoch 148 |  iter 10 / 10 | loss 0.23
| epoch 149 |  iter 10 / 10 | loss 0.22
| epoch 150 |  iter 10 / 10 | loss 0.22
| epoch 151 |  iter 10 / 10 | loss 0.22
| epoch 152 |  iter 10 / 10 | loss 0.22
| epoch 153 |  iter 10 / 10 | loss 0.22
| epoch 154 |  iter 10 / 10 | loss 0.22
| epoch 155 |  iter 10 / 10 | loss 0.22
| epoch 156 |  iter 10 / 10 | loss 0.21
| epoch 157 |  iter 10 / 10 | loss 0.21
| epoch 158 |  iter 10 / 10 | loss 0.20
| epoch 159 |  iter 10 / 10 | loss 0.21
| epoch 160 |  iter 10 / 10 | loss 0.20
| epoch 161 |  iter 10 / 10 | loss 0.20
| epoch 162 |  iter 10 / 10 | loss 0.20
| epoch 163 |  iter 10 / 10 | loss 0.21
| epoch 164 |  iter 10 / 10 | loss 0.20
| epoch 165 |  iter 10 / 10 | loss 0.20
| epoch 166 |  iter 10 / 10 | loss 0.19
| epoch 167 |  iter 10 / 10 | loss 0.19
| epoch 168 |  iter 10 / 10 | loss 0.19
| epoch 169 |  iter 10 / 10 | loss 0.19
| epoch 170 |  iter 10 / 10 | loss 0.19
| epoch 171 |  iter 10 / 10 | loss 0.19
| epoch 172 |  iter 10 / 10 | loss 0.18
| epoch 173 |  iter 10 / 10 | loss 0.18
| epoch 174 |  iter 10 / 10 | loss 0.18
| epoch 175 |  iter 10 / 10 | loss 0.18
| epoch 176 |  iter 10 / 10 | loss 0.18
| epoch 177 |  iter 10 / 10 | loss 0.18
| epoch 178 |  iter 10 / 10 | loss 0.18
| epoch 179 |  iter 10 / 10 | loss 0.17
| epoch 180 |  iter 10 / 10 | loss 0.17
| epoch 181 |  iter 10 / 10 | loss 0.18
| epoch 182 |  iter 10 / 10 | loss 0.17
| epoch 183 |  iter 10 / 10 | loss 0.18
| epoch 184 |  iter 10 / 10 | loss 0.17
| epoch 185 |  iter 10 / 10 | loss 0.17
| epoch 186 |  iter 10 / 10 | loss 0.18
| epoch 187 |  iter 10 / 10 | loss 0.17
| epoch 188 |  iter 10 / 10 | loss 0.17
| epoch 189 |  iter 10 / 10 | loss 0.17
| epoch 190 |  iter 10 / 10 | loss 0.17
| epoch 191 |  iter 10 / 10 | loss 0.16
| epoch 192 |  iter 10 / 10 | loss 0.17
| epoch 193 |  iter 10 / 10 | loss 0.16
| epoch 194 |  iter 10 / 10 | loss 0.16
| epoch 195 |  iter 10 / 10 | loss 0.16
| epoch 196 |  iter 10 / 10 | loss 0.16
| epoch 197 |  iter 10 / 10 | loss 0.16
| epoch 198 |  iter 10 / 10 | loss 0.15
| epoch 199 |  iter 10 / 10 | loss 0.16
| epoch 200 |  iter 10 / 10 | loss 0.16
| epoch 201 |  iter 10 / 10 | loss 0.15
| epoch 202 |  iter 10 / 10 | loss 0.16
| epoch 203 |  iter 10 / 10 | loss 0.16
| epoch 204 |  iter 10 / 10 | loss 0.15
| epoch 205 |  iter 10 / 10 | loss 0.16
| epoch 206 |  iter 10 / 10 | loss 0.15
| epoch 207 |  iter 10 / 10 | loss 0.15
| epoch 208 |  iter 10 / 10 | loss 0.15
| epoch 209 |  iter 10 / 10 | loss 0.15
| epoch 210 |  iter 10 / 10 | loss 0.15
| epoch 211 |  iter 10 / 10 | loss 0.15
| epoch 212 |  iter 10 / 10 | loss 0.15
| epoch 213 |  iter 10 / 10 | loss 0.15
| epoch 214 |  iter 10 / 10 | loss 0.15
| epoch 215 |  iter 10 / 10 | loss 0.15
| epoch 216 |  iter 10 / 10 | loss 0.14
| epoch 217 |  iter 10 / 10 | loss 0.14
| epoch 218 |  iter 10 / 10 | loss 0.15
| epoch 219 |  iter 10 / 10 | loss 0.14
| epoch 220 |  iter 10 / 10 | loss 0.14
| epoch 221 |  iter 10 / 10 | loss 0.14
| epoch 222 |  iter 10 / 10 | loss 0.14
| epoch 223 |  iter 10 / 10 | loss 0.14
| epoch 224 |  iter 10 / 10 | loss 0.14
| epoch 225 |  iter 10 / 10 | loss 0.14
| epoch 226 |  iter 10 / 10 | loss 0.14
| epoch 227 |  iter 10 / 10 | loss 0.14
| epoch 228 |  iter 10 / 10 | loss 0.14
| epoch 229 |  iter 10 / 10 | loss 0.13
| epoch 230 |  iter 10 / 10 | loss 0.14
| epoch 231 |  iter 10 / 10 | loss 0.13
| epoch 232 |  iter 10 / 10 | loss 0.14
| epoch 233 |  iter 10 / 10 | loss 0.13
| epoch 234 |  iter 10 / 10 | loss 0.13
| epoch 235 |  iter 10 / 10 | loss 0.13
| epoch 236 |  iter 10 / 10 | loss 0.13
| epoch 237 |  iter 10 / 10 | loss 0.14
| epoch 238 |  iter 10 / 10 | loss 0.13
| epoch 239 |  iter 10 / 10 | loss 0.13
| epoch 240 |  iter 10 / 10 | loss 0.14
| epoch 241 |  iter 10 / 10 | loss 0.13
| epoch 242 |  iter 10 / 10 | loss 0.13
| epoch 243 |  iter 10 / 10 | loss 0.13
| epoch 244 |  iter 10 / 10 | loss 0.13
| epoch 245 |  iter 10 / 10 | loss 0.13
| epoch 246 |  iter 10 / 10 | loss 0.13
| epoch 247 |  iter 10 / 10 | loss 0.13
| epoch 248 |  iter 10 / 10 | loss 0.13
| epoch 249 |  iter 10 / 10 | loss 0.13
| epoch 250 |  iter 10 / 10 | loss 0.13
| epoch 251 |  iter 10 / 10 | loss 0.13
| epoch 252 |  iter 10 / 10 | loss 0.12
| epoch 253 |  iter 10 / 10 | loss 0.12
| epoch 254 |  iter 10 / 10 | loss 0.12
| epoch 255 |  iter 10 / 10 | loss 0.12
| epoch 256 |  iter 10 / 10 | loss 0.12
| epoch 257 |  iter 10 / 10 | loss 0.12
| epoch 258 |  iter 10 / 10 | loss 0.12
| epoch 259 |  iter 10 / 10 | loss 0.13
| epoch 260 |  iter 10 / 10 | loss 0.12
| epoch 261 |  iter 10 / 10 | loss 0.13
| epoch 262 |  iter 10 / 10 | loss 0.12
| epoch 263 |  iter 10 / 10 | loss 0.12
| epoch 264 |  iter 10 / 10 | loss 0.13
| epoch 265 |  iter 10 / 10 | loss 0.12
| epoch 266 |  iter 10 / 10 | loss 0.12
| epoch 267 |  iter 10 / 10 | loss 0.12
| epoch 268 |  iter 10 / 10 | loss 0.12
| epoch 269 |  iter 10 / 10 | loss 0.11
| epoch 270 |  iter 10 / 10 | loss 0.12
| epoch 271 |  iter 10 / 10 | loss 0.12
| epoch 272 |  iter 10 / 10 | loss 0.12
| epoch 273 |  iter 10 / 10 | loss 0.12
| epoch 274 |  iter 10 / 10 | loss 0.12
| epoch 275 |  iter 10 / 10 | loss 0.11
| epoch 276 |  iter 10 / 10 | loss 0.12
| epoch 277 |  iter 10 / 10 | loss 0.12
| epoch 278 |  iter 10 / 10 | loss 0.11
| epoch 279 |  iter 10 / 10 | loss 0.11
| epoch 280 |  iter 10 / 10 | loss 0.11
| epoch 281 |  iter 10 / 10 | loss 0.11
| epoch 282 |  iter 10 / 10 | loss 0.12
| epoch 283 |  iter 10 / 10 | loss 0.11
| epoch 284 |  iter 10 / 10 | loss 0.11
| epoch 285 |  iter 10 / 10 | loss 0.11
| epoch 286 |  iter 10 / 10 | loss 0.11
| epoch 287 |  iter 10 / 10 | loss 0.11
| epoch 288 |  iter 10 / 10 | loss 0.12
| epoch 289 |  iter 10 / 10 | loss 0.11
| epoch 290 |  iter 10 / 10 | loss 0.11
| epoch 291 |  iter 10 / 10 | loss 0.11
| epoch 292 |  iter 10 / 10 | loss 0.11
| epoch 293 |  iter 10 / 10 | loss 0.11
| epoch 294 |  iter 10 / 10 | loss 0.11
| epoch 295 |  iter 10 / 10 | loss 0.12
| epoch 296 |  iter 10 / 10 | loss 0.11
| epoch 297 |  iter 10 / 10 | loss 0.12
| epoch 298 |  iter 10 / 10 | loss 0.11
| epoch 299 |  iter 10 / 10 | loss 0.11
| epoch 300 |  iter 10 / 10 | loss 0.11
Traceback (most recent call last):
  File "train_custom_loop.py", line 56, in <module>
    plt.plot(np.arange(len(loss_list)), loss_list, label='train')
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 3347, in plot
    ax = gca()
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 984, in gca
    return gcf().gca(**kwargs)
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 601, in gcf
    return figure()
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 548, in figure
    **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 161, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 167, in new_figure_manager_given_figure
    canvas = cls.FigureCanvas(figure)
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 24, in __init__
    super(FigureCanvasQTAgg, self).__init__(figure=figure)
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 234, in __init__
    _create_qApp()
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 125, in _create_qApp
    raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# pip install matplotlib
Requirement already satisfied: matplotlib in /opt/conda/lib/python3.6/site-packages (2.2.2)
Requirement already satisfied: numpy>=1.7.1 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (1.14.3)
Requirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (2.2.0)
Requirement already satisfied: python-dateutil>=2.1 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (2.7.3)
Requirement already satisfied: pytz in /opt/conda/lib/python3.6/site-packages (from matplotlib) (2018.4)
Requirement already satisfied: six>=1.10 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (1.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/lib/python3.6/site-packages (from matplotlib) (1.0.1)
Requirement already satisfied: setuptools in /opt/conda/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib) (39.1.0)

14:33 | Impressed! | Voted(0) | Comment(0)
2018/09/25

python deep learning from scratch 2

Tweet ThisSend to Facebook | by kaizen
$  docker pull continuumio/anaconda3
Using default tag: latest
latest: Pulling from continuumio/anaconda3
Digest: sha256:e07b9ca98ac1eeb1179dbf0e0bbcebd87701f8654878d6d8ce164d71746964d1
Status: Image is up to date for continuumio/anaconda3:latest
OgawaKiyoshi-no-MacBook-Pro:docker-toppers ogawakiyoshi$ docker run -it continuumio/anaconda3 /bin/bash
(base) root@f19e2f06eabb:/# apt-get update
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:3 http://deb.debian.org/debian stretch Release [118 kB]
Get:4 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:5 http://deb.debian.org/debian stretch-updates/main amd64 Packages.diff/Index [5164 B]
Get:6 http://deb.debian.org/debian stretch Release.gpg [2434 B]
Get:7 http://deb.debian.org/debian stretch-updates/main amd64 Packages 2018-07-20-2027.50.pdiff [1134 B]
Get:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages 2018-07-31-2010.17.pdiff [1388 B]
Get:8 http://deb.debian.org/debian stretch-updates/main amd64 Packages 2018-07-31-2010.17.pdiff [1388 B]
Get:9 http://deb.debian.org/debian stretch/main amd64 Packages [9500 kB]
Get:10 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [550 kB]
Fetched 10.4 MB in 19s (537 kB/s)                                                                                                      
Reading package lists... Done
(base) root@f19e2f06eabb:/# apt-get install -y procps
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libprocps6 psmisc
The following NEW packages will be installed:
  libprocps6 procps psmisc
0 upgraded, 3 newly installed, 0 to remove and 25 not upgraded.
Need to get 431 kB of archives.
After this operation, 1434 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian stretch/main amd64 libprocps6 amd64 2:3.3.12-3+deb9u1 [58.5 kB]
Get:2 http://deb.debian.org/debian stretch/main amd64 procps amd64 2:3.3.12-3+deb9u1 [250 kB]
Get:3 http://deb.debian.org/debian stretch/main amd64 psmisc amd64 22.21-2.1+b2 [123 kB]
Fetched 431 kB in 0s (1578 kB/s) 
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libprocps6:amd64.
(Reading database ... 12521 files and directories currently installed.)
Preparing to unpack .../libprocps6_2%3a3.3.12-3+deb9u1_amd64.deb ...
Unpacking libprocps6:amd64 (2:3.3.12-3+deb9u1) ...
Selecting previously unselected package procps.
Preparing to unpack .../procps_2%3a3.3.12-3+deb9u1_amd64.deb ...
Unpacking procps (2:3.3.12-3+deb9u1) ...
Selecting previously unselected package psmisc.
Preparing to unpack .../psmisc_22.21-2.1+b2_amd64.deb ...
Unpacking psmisc (22.21-2.1+b2) ...
Setting up psmisc (22.21-2.1+b2) ...
Setting up libprocps6:amd64 (2:3.3.12-3+deb9u1) ...
Setting up procps (2:3.3.12-3+deb9u1) ...
update-alternatives: using /usr/bin/w.procps to provide /usr/bin/w (w) in auto mode
Processing triggers for libc-bin (2.24-11+deb9u3) ...
(base) root@f19e2f06eabb:/# apt-get install -y vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  vim-common vim-runtime xxd
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-common vim-runtime xxd
0 upgraded, 4 newly installed, 0 to remove and 25 not upgraded.
Need to get 6731 kB of archives.
After this operation, 31.1 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian stretch/main amd64 xxd amd64 2:8.0.0197-4+deb9u1 [132 kB]
Get:2 http://deb.debian.org/debian stretch/main amd64 vim-common all 2:8.0.0197-4+deb9u1 [159 kB]
Get:3 http://deb.debian.org/debian stretch/main amd64 vim-runtime all 2:8.0.0197-4+deb9u1 [5407 kB]
Get:4 http://deb.debian.org/debian stretch/main amd64 vim amd64 2:8.0.0197-4+deb9u1 [1034 kB]
Fetched 6731 kB in 6s (1093 kB/s)                                                                                                      
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package xxd.
(Reading database ... 12636 files and directories currently installed.)
Preparing to unpack .../xxd_2%3a8.0.0197-4+deb9u1_amd64.deb ...
Unpacking xxd (2:8.0.0197-4+deb9u1) ...
Selecting previously unselected package vim-common.
Preparing to unpack .../vim-common_2%3a8.0.0197-4+deb9u1_all.deb ...
Unpacking vim-common (2:8.0.0197-4+deb9u1) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../vim-runtime_2%3a8.0.0197-4+deb9u1_all.deb ...
Adding 'diversion of /usr/share/vim/vim80/doc/help.txt to /usr/share/vim/vim80/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim80/doc/tags to /usr/share/vim/vim80/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:8.0.0197-4+deb9u1) ...
Selecting previously unselected package vim.
Preparing to unpack .../vim_2%3a8.0.0197-4+deb9u1_amd64.deb ...
Unpacking vim (2:8.0.0197-4+deb9u1) ...
Processing triggers for mime-support (3.60) ...
Setting up xxd (2:8.0.0197-4+deb9u1) ...
Setting up vim-common (2:8.0.0197-4+deb9u1) ...
Setting up vim-runtime (2:8.0.0197-4+deb9u1) ...
Setting up vim (2:8.0.0197-4+deb9u1) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode
(base) root@f19e2f06eabb:/# git https://github.com/oreilly-japan/deep-learning-from-scratch-2.git
git: 'https://github.com/oreilly-japan/deep-learning-from-scratch-2.git' is not a git command. See 'git --help'.
(base) root@f19e2f06eabb:/# git clone https://github.com/oreilly-japan/deep-learning-from-scratch-2.git
Cloning into 'deep-learning-from-scratch-2'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 320 (delta 4), reused 3 (delta 3), pack-reused 303
Receiving objects: 100% (320/320), 7.51 MiB | 1.93 MiB/s, done.
Resolving deltas: 100% (178/178), done.
(base) root@f19e2f06eabb:/# ls
bin  boot  deep-learning-from-scratch-2  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
(base) root@f19e2f06eabb:/# cd deep-learning-from-scratch-2/
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2# ls
LICENSE.md  README.md  ch01  ch02  ch03  ch04  ch05  ch06  ch07  ch08  common  dataset
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2# cd ch01
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# ls
forward_net.pyshow_spiral_dataset.pytrain.py  train_custom_loop.pytwo_layer_net.py
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# python forward_net.py
[[-3.75987607  2.88184767  0.70790565]
 [-4.00541319  2.45471769  1.69667098]
 [-3.86374037  2.09590372  2.05944503]
 [-3.2456851   2.20352841  0.84411808]
 [-3.54065719  2.17029004  1.46937473]
 [-4.00934517  2.25979763  1.99581236]
 [-3.9925953   2.64020227  1.42864389]
 [-3.64107153  2.73896715  0.71204338]
 [-3.96827961  2.6421512   1.40249969]
 [-3.77412466  3.0798037   0.35972095]]
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# python show_spiral_dataset.py 
Traceback (most recent call last):
  File "show_spiral_dataset.py", line 5, in <module>
    import matplotlib.pyplot as plt
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup
    [backend_name], 0)
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 15, in <module>
    from .backend_qt5 import (
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 19, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 54, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_compat.py", line 140, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# python train.py
Traceback (most recent call last):
  File "train.py", line 5, in <module>
    from common.trainer import Trainer
  File "../common/trainer.py", line 6, in <module>
    import matplotlib.pyplot as plt
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup
    [backend_name], 0)
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 15, in <module>
    from .backend_qt5 import (
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 19, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 54, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_compat.py", line 140, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# python train_custom_loop.py 
Traceback (most recent call last):
  File "train_custom_loop.py", line 7, in <module>
    import matplotlib.pyplot as plt
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup
    [backend_name], 0)
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 15, in <module>
    from .backend_qt5 import (
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 19, in <module>
    import matplotlib.backends.qt_editor.figureoptions as figureoptions
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py", line 20, in <module>
    import matplotlib.backends.qt_editor.formlayout as formlayout
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py", line 54, in <module>
    from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
  File "/opt/conda/lib/python3.6/site-packages/matplotlib/backends/qt_compat.py", line 140, in <module>
    from PyQt5 import QtCore, QtGui, QtWidgets
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# python two_layer_net.py 
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# 
# pip install pyqt5
Collecting pyqt5
  Downloading https://files.pythonhosted.org/packages/3a/c7/4a9bec78c864051051b41b4cc76672ecc232e6dc7dbb91a5f8ff6f20ff64/PyQt5-5.11.2-5.11.1-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl (117.9MB)
    100% |████████████████████████████████| 117.9MB 311kB/s 
Collecting PyQt5_sip<4.20,>=4.19.11 (from pyqt5)
  Downloading https://files.pythonhosted.org/packages/d7/db/06ad1f62a1f80a5df639c322066f03db381c1a6322c02087e75092427838/PyQt5_sip-4.19.12-cp36-cp36m-manylinux1_x86_64.whl (66kB)
    100% |████████████████████████████████| 71kB 30kB/s 
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: PyQt5-sip, pyqt5
Successfully installed PyQt5-sip-4.19.12 pyqt5-5.11.2
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# pip update pip
ERROR: unknown command "update"
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# pip install pip
Requirement already satisfied: pip in /opt/conda/lib/python3.6/site-packages (10.0.1)
distributed 1.21.8 requires msgpack, which is not installed.
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 2.0MB/s 
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
      Successfully uninstalled pip-10.0.1
Successfully installed pip-18.0
v(base) root@f19e2f06eabb:/deep-learning-from-scratch-2/ch01# apt-get install -y libgl1-mesa-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libdrm-amdgpu1 libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
  libllvm3.9 libpciaccess0 libpthread-stubs0-dev libsensors4 libtxc-dxtn-s2tc libx11-dev libx11-doc libx11-xcb-dev libx11-xcb1
  libxau-dev libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-present-dev
  libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-sync-dev
  libxcb-sync1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb1-dev libxdamage-dev libxdamage1 libxdmcp-dev libxext-dev libxfixes-dev
  libxfixes3 libxshmfence-dev libxshmfence1 libxxf86vm-dev libxxf86vm1 mesa-common-dev x11proto-core-dev x11proto-damage-dev
  x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev x11proto-xf86vidmode-dev
  xorg-sgml-doctools xtrans-dev
Suggested packages:
  pciutils lm-sensors libxcb-doc libxext-doc
The following NEW packages will be installed:
  libdrm-amdgpu1 libdrm-dev libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx
  libglapi-mesa libllvm3.9 libpciaccess0 libpthread-stubs0-dev libsensors4 libtxc-dxtn-s2tc libx11-dev libx11-doc libx11-xcb-dev
  libx11-xcb1 libxau-dev libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-glx0 libxcb-glx0-dev libxcb-present-dev
  libxcb-present0 libxcb-randr0 libxcb-randr0-dev libxcb-render0 libxcb-render0-dev libxcb-shape0 libxcb-shape0-dev libxcb-sync-dev
  libxcb-sync1 libxcb-xfixes0 libxcb-xfixes0-dev libxcb1-dev libxdamage-dev libxdamage1 libxdmcp-dev libxext-dev libxfixes-dev
  libxfixes3 libxshmfence-dev libxshmfence1 libxxf86vm-dev libxxf86vm1 mesa-common-dev x11proto-core-dev x11proto-damage-dev
  x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev x11proto-xf86vidmode-dev
  xorg-sgml-doctools xtrans-dev
0 upgraded, 61 newly installed, 0 to remove and 25 not upgraded.
Need to get 24.4 MB of archives.
After this operation, 193 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian stretch/main amd64 libdrm2 amd64 2.4.74-1 [36.2 kB]
Get:2 http://deb.debian.org/debian stretch/main amd64 libdrm-amdgpu1 amd64 2.4.74-1 [26.4 kB]
Get:3 http://deb.debian.org/debian stretch/main amd64 libpciaccess0 amd64 0.13.4-1+b2 [50.0 kB]
Get:4 http://deb.debian.org/debian stretch/main amd64 libdrm-intel1 amd64 2.4.74-1 [68.7 kB]
Get:5 http://deb.debian.org/debian stretch/main amd64 libdrm-radeon1 amd64 2.4.74-1 [30.2 kB]
Get:6 http://deb.debian.org/debian stretch/main amd64 libdrm-nouveau2 amd64 2.4.74-1 [25.1 kB]
Get:7 http://deb.debian.org/debian stretch/main amd64 libdrm-dev amd64 2.4.74-1 [232 kB]
Get:8 http://deb.debian.org/debian stretch/main amd64 xorg-sgml-doctools all 1:1.11-1 [21.9 kB]
Get:9 http://deb.debian.org/debian stretch/main amd64 x11proto-core-dev all 7.0.31-1 [728 kB]
Get:10 http://deb.debian.org/debian stretch/main amd64 libxau-dev amd64 1:1.0.8-1 [23.6 kB]
Get:11 http://deb.debian.org/debian stretch/main amd64 libxdmcp-dev amd64 1:1.1.2-3 [42.2 kB]
Get:12 http://deb.debian.org/debian stretch/main amd64 x11proto-input-dev all 2.3.2-1 [158 kB]
Get:13 http://deb.debian.org/debian stretch/main amd64 x11proto-kb-dev all 1.0.7-1 [233 kB]
Get:14 http://deb.debian.org/debian stretch/main amd64 xtrans-dev all 1.3.5-1 [100 kB]
Get:15 http://deb.debian.org/debian stretch/main amd64 libpthread-stubs0-dev amd64 0.3-4 [3866 B]
Get:16 http://deb.debian.org/debian stretch/main amd64 libxcb1-dev amd64 1.12-1 [169 kB]
Get:17 http://deb.debian.org/debian stretch/main amd64 libx11-dev amd64 2:1.6.4-3 [815 kB]
Get:18 http://deb.debian.org/debian stretch/main amd64 mesa-common-dev amd64 13.0.6-1+b2 [517 kB]
Get:19 http://deb.debian.org/debian stretch/main amd64 libglapi-mesa amd64 13.0.6-1+b2 [58.9 kB]
Get:20 http://deb.debian.org/debian stretch/main amd64 libx11-xcb1 amd64 2:1.6.4-3 [183 kB]
Get:21 http://deb.debian.org/debian stretch/main amd64 libxcb-dri2-0 amd64 1.12-1 [97.2 kB]
Get:22 http://deb.debian.org/debian stretch/main amd64 libxcb-dri3-0 amd64 1.12-1 [95.6 kB]
Get:23 http://deb.debian.org/debian stretch/main amd64 libxcb-glx0 amd64 1.12-1 [113 kB]
Get:24 http://deb.debian.org/debian stretch/main amd64 libxcb-present0 amd64 1.12-1 [95.8 kB]
Get:25 http://deb.debian.org/debian stretch/main amd64 libxcb-sync1 amd64 1.12-1 [99.2 kB]
Get:26 http://deb.debian.org/debian stretch/main amd64 libxfixes3 amd64 1:5.0.3-1 [21.9 kB]
Get:27 http://deb.debian.org/debian stretch/main amd64 libxdamage1 amd64 1:1.1.4-2+b3 [14.5 kB]
Get:28 http://deb.debian.org/debian stretch/main amd64 libxshmfence1 amd64 1.2-1+b2 [7922 B]
Get:29 http://deb.debian.org/debian stretch/main amd64 libxxf86vm1 amd64 1:1.1.4-1+b2 [20.8 kB]
Get:30 http://deb.debian.org/debian stretch/main amd64 libgl1-mesa-glx amd64 13.0.6-1+b2 [167 kB]
Get:31 http://deb.debian.org/debian stretch/main amd64 libx11-xcb-dev amd64 2:1.6.4-3 [185 kB]
Get:32 http://deb.debian.org/debian stretch/main amd64 libxcb-dri3-dev amd64 1.12-1 [96.1 kB]
Get:33 http://deb.debian.org/debian stretch/main amd64 libxcb-randr0 amd64 1.12-1 [107 kB]
Get:34 http://deb.debian.org/debian stretch/main amd64 libxcb-render0 amd64 1.12-1 [105 kB]
Get:35 http://deb.debian.org/debian stretch/main amd64 libxcb-render0-dev amd64 1.12-1 [109 kB]
Get:36 http://deb.debian.org/debian stretch/main amd64 libxcb-randr0-dev amd64 1.12-1 [110 kB]
Get:37 http://deb.debian.org/debian stretch/main amd64 libxcb-xfixes0 amd64 1.12-1 [99.6 kB]
Get:38 http://deb.debian.org/debian stretch/main amd64 libxcb-shape0 amd64 1.12-1 [96.2 kB]
Get:39 http://deb.debian.org/debian stretch/main amd64 libxcb-shape0-dev amd64 1.12-1 [97.4 kB]
Get:40 http://deb.debian.org/debian stretch/main amd64 libxcb-xfixes0-dev amd64 1.12-1 [102 kB]
Get:41 http://deb.debian.org/debian stretch/main amd64 libxcb-sync-dev amd64 1.12-1 [101 kB]
Get:42 http://deb.debian.org/debian stretch/main amd64 libxcb-present-dev amd64 1.12-1 [97.2 kB]
Get:43 http://deb.debian.org/debian stretch/main amd64 libxshmfence-dev amd64 1.2-1+b2 [7420 B]
Get:44 http://deb.debian.org/debian stretch/main amd64 libxcb-dri2-0-dev amd64 1.12-1 [98.8 kB]
Get:45 http://deb.debian.org/debian stretch/main amd64 libxcb-glx0-dev amd64 1.12-1 [118 kB]
Get:46 http://deb.debian.org/debian stretch/main amd64 x11proto-xext-dev all 7.3.0-1 [212 kB]
Get:47 http://deb.debian.org/debian stretch/main amd64 x11proto-fixes-dev all 1:5.0-2 [19.2 kB]
Get:48 http://deb.debian.org/debian stretch/main amd64 libxfixes-dev amd64 1:5.0.3-1 [23.8 kB]
Get:49 http://deb.debian.org/debian stretch/main amd64 x11proto-damage-dev all 1:1.2.1-2 [11.8 kB]
Get:50 http://deb.debian.org/debian stretch/main amd64 libxdamage-dev amd64 1:1.1.4-2+b3 [14.3 kB]
Get:51 http://deb.debian.org/debian stretch/main amd64 libxext-dev amd64 2:1.3.3-1+b2 [107 kB]
Get:52 http://deb.debian.org/debian stretch/main amd64 x11proto-xf86vidmode-dev all 2.3.1-2 [6114 B]
Get:53 http://deb.debian.org/debian stretch/main amd64 libxxf86vm-dev amd64 1:1.1.4-1+b2 [25.4 kB]
Get:54 http://deb.debian.org/debian stretch/main amd64 x11proto-dri2-dev all 2.8-2 [18.2 kB]
Get:55 http://deb.debian.org/debian stretch/main amd64 x11proto-gl-dev all 1.4.17-1 [28.0 kB]
Get:56 http://deb.debian.org/debian stretch/main amd64 libgl1-mesa-dev amd64 13.0.6-1+b2 [41.5 kB]
Get:57 http://deb.debian.org/debian stretch/main amd64 libllvm3.9 amd64 1:3.9.1-9 [11.3 MB]
Get:58 http://deb.debian.org/debian stretch/main amd64 libsensors4 amd64 1:3.4.0-4 [53.3 kB]                                           
Get:59 http://deb.debian.org/debian stretch/main amd64 libgl1-mesa-dri amd64 13.0.6-1+b2 [4536 kB]                                     
Get:60 http://deb.debian.org/debian stretch/main amd64 libx11-doc all 2:1.6.4-3 [2201 kB]                                              
Get:61 http://deb.debian.org/debian stretch/main amd64 libtxc-dxtn-s2tc amd64 1.0+git20151227-2 [48.4 kB]                              
Fetched 24.4 MB in 9s (2455 kB/s)                                                                                                      
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libdrm2:amd64.
(Reading database ... 14446 files and directories currently installed.)
Preparing to unpack .../00-libdrm2_2.4.74-1_amd64.deb ...
Unpacking libdrm2:amd64 (2.4.74-1) ...
Selecting previously unselected package libdrm-amdgpu1:amd64.
Preparing to unpack .../01-libdrm-amdgpu1_2.4.74-1_amd64.deb ...
Unpacking libdrm-amdgpu1:amd64 (2.4.74-1) ...
Selecting previously unselected package libpciaccess0:amd64.
Preparing to unpack .../02-libpciaccess0_0.13.4-1+b2_amd64.deb ...
Unpacking libpciaccess0:amd64 (0.13.4-1+b2) ...
Selecting previously unselected package libdrm-intel1:amd64.
Preparing to unpack .../03-libdrm-intel1_2.4.74-1_amd64.deb ...
Unpacking libdrm-intel1:amd64 (2.4.74-1) ...
Selecting previously unselected package libdrm-radeon1:amd64.
Preparing to unpack .../04-libdrm-radeon1_2.4.74-1_amd64.deb ...
Unpacking libdrm-radeon1:amd64 (2.4.74-1) ...
Selecting previously unselected package libdrm-nouveau2:amd64.
Preparing to unpack .../05-libdrm-nouveau2_2.4.74-1_amd64.deb ...
Unpacking libdrm-nouveau2:amd64 (2.4.74-1) ...
Selecting previously unselected package libdrm-dev:amd64.
Preparing to unpack .../06-libdrm-dev_2.4.74-1_amd64.deb ...
Unpacking libdrm-dev:amd64 (2.4.74-1) ...
Selecting previously unselected package xorg-sgml-doctools.
Preparing to unpack .../07-xorg-sgml-doctools_1%3a1.11-1_all.deb ...
Unpacking xorg-sgml-doctools (1:1.11-1) ...
Selecting previously unselected package x11proto-core-dev.
Preparing to unpack .../08-x11proto-core-dev_7.0.31-1_all.deb ...
Unpacking x11proto-core-dev (7.0.31-1) ...
Selecting previously unselected package libxau-dev:amd64.
Preparing to unpack .../09-libxau-dev_1%3a1.0.8-1_amd64.deb ...
Unpacking libxau-dev:amd64 (1:1.0.8-1) ...
Selecting previously unselected package libxdmcp-dev:amd64.
Preparing to unpack .../10-libxdmcp-dev_1%3a1.1.2-3_amd64.deb ...
Unpacking libxdmcp-dev:amd64 (1:1.1.2-3) ...
Selecting previously unselected package x11proto-input-dev.
Preparing to unpack .../11-x11proto-input-dev_2.3.2-1_all.deb ...
Unpacking x11proto-input-dev (2.3.2-1) ...
Selecting previously unselected package x11proto-kb-dev.
Preparing to unpack .../12-x11proto-kb-dev_1.0.7-1_all.deb ...
Unpacking x11proto-kb-dev (1.0.7-1) ...
Selecting previously unselected package xtrans-dev.
Preparing to unpack .../13-xtrans-dev_1.3.5-1_all.deb ...
Unpacking xtrans-dev (1.3.5-1) ...
Selecting previously unselected package libpthread-stubs0-dev:amd64.
Preparing to unpack .../14-libpthread-stubs0-dev_0.3-4_amd64.deb ...
Unpacking libpthread-stubs0-dev:amd64 (0.3-4) ...
Selecting previously unselected package libxcb1-dev:amd64.
Preparing to unpack .../15-libxcb1-dev_1.12-1_amd64.deb ...
Unpacking libxcb1-dev:amd64 (1.12-1) ...
Selecting previously unselected package libx11-dev:amd64.
Preparing to unpack .../16-libx11-dev_2%3a1.6.4-3_amd64.deb ...
Unpacking libx11-dev:amd64 (2:1.6.4-3) ...
Selecting previously unselected package mesa-common-dev:amd64.
Preparing to unpack .../17-mesa-common-dev_13.0.6-1+b2_amd64.deb ...
Unpacking mesa-common-dev:amd64 (13.0.6-1+b2) ...
Selecting previously unselected package libglapi-mesa:amd64.
Preparing to unpack .../18-libglapi-mesa_13.0.6-1+b2_amd64.deb ...
Unpacking libglapi-mesa:amd64 (13.0.6-1+b2) ...
Selecting previously unselected package libx11-xcb1:amd64.
Preparing to unpack .../19-libx11-xcb1_2%3a1.6.4-3_amd64.deb ...
Unpacking libx11-xcb1:amd64 (2:1.6.4-3) ...
Selecting previously unselected package libxcb-dri2-0:amd64.
Preparing to unpack .../20-libxcb-dri2-0_1.12-1_amd64.deb ...
Unpacking libxcb-dri2-0:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-dri3-0:amd64.
Preparing to unpack .../21-libxcb-dri3-0_1.12-1_amd64.deb ...
Unpacking libxcb-dri3-0:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-glx0:amd64.
Preparing to unpack .../22-libxcb-glx0_1.12-1_amd64.deb ...
Unpacking libxcb-glx0:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-present0:amd64.
Preparing to unpack .../23-libxcb-present0_1.12-1_amd64.deb ...
Unpacking libxcb-present0:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-sync1:amd64.
Preparing to unpack .../24-libxcb-sync1_1.12-1_amd64.deb ...
Unpacking libxcb-sync1:amd64 (1.12-1) ...
Selecting previously unselected package libxfixes3:amd64.
Preparing to unpack .../25-libxfixes3_1%3a5.0.3-1_amd64.deb ...
Unpacking libxfixes3:amd64 (1:5.0.3-1) ...
Selecting previously unselected package libxdamage1:amd64.
Preparing to unpack .../26-libxdamage1_1%3a1.1.4-2+b3_amd64.deb ...
Unpacking libxdamage1:amd64 (1:1.1.4-2+b3) ...
Selecting previously unselected package libxshmfence1:amd64.
Preparing to unpack .../27-libxshmfence1_1.2-1+b2_amd64.deb ...
Unpacking libxshmfence1:amd64 (1.2-1+b2) ...
Selecting previously unselected package libxxf86vm1:amd64.
Preparing to unpack .../28-libxxf86vm1_1%3a1.1.4-1+b2_amd64.deb ...
Unpacking libxxf86vm1:amd64 (1:1.1.4-1+b2) ...
Selecting previously unselected package libgl1-mesa-glx:amd64.
Preparing to unpack .../29-libgl1-mesa-glx_13.0.6-1+b2_amd64.deb ...
Unpacking libgl1-mesa-glx:amd64 (13.0.6-1+b2) ...
Selecting previously unselected package libx11-xcb-dev:amd64.
Preparing to unpack .../30-libx11-xcb-dev_2%3a1.6.4-3_amd64.deb ...
Unpacking libx11-xcb-dev:amd64 (2:1.6.4-3) ...
Selecting previously unselected package libxcb-dri3-dev:amd64.
Preparing to unpack .../31-libxcb-dri3-dev_1.12-1_amd64.deb ...
Unpacking libxcb-dri3-dev:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-randr0:amd64.
Preparing to unpack .../32-libxcb-randr0_1.12-1_amd64.deb ...
Unpacking libxcb-randr0:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-render0:amd64.
Preparing to unpack .../33-libxcb-render0_1.12-1_amd64.deb ...
Unpacking libxcb-render0:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-render0-dev:amd64.
Preparing to unpack .../34-libxcb-render0-dev_1.12-1_amd64.deb ...
Unpacking libxcb-render0-dev:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-randr0-dev:amd64.
Preparing to unpack .../35-libxcb-randr0-dev_1.12-1_amd64.deb ...
Unpacking libxcb-randr0-dev:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-xfixes0:amd64.
Preparing to unpack .../36-libxcb-xfixes0_1.12-1_amd64.deb ...
Unpacking libxcb-xfixes0:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-shape0:amd64.
Preparing to unpack .../37-libxcb-shape0_1.12-1_amd64.deb ...
Unpacking libxcb-shape0:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-shape0-dev:amd64.
Preparing to unpack .../38-libxcb-shape0-dev_1.12-1_amd64.deb ...
Unpacking libxcb-shape0-dev:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-xfixes0-dev:amd64.
Preparing to unpack .../39-libxcb-xfixes0-dev_1.12-1_amd64.deb ...
Unpacking libxcb-xfixes0-dev:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-sync-dev:amd64.
Preparing to unpack .../40-libxcb-sync-dev_1.12-1_amd64.deb ...
Unpacking libxcb-sync-dev:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-present-dev:amd64.
Preparing to unpack .../41-libxcb-present-dev_1.12-1_amd64.deb ...
Unpacking libxcb-present-dev:amd64 (1.12-1) ...
Selecting previously unselected package libxshmfence-dev:amd64.
Preparing to unpack .../42-libxshmfence-dev_1.2-1+b2_amd64.deb ...
Unpacking libxshmfence-dev:amd64 (1.2-1+b2) ...
Selecting previously unselected package libxcb-dri2-0-dev:amd64.
Preparing to unpack .../43-libxcb-dri2-0-dev_1.12-1_amd64.deb ...
Unpacking libxcb-dri2-0-dev:amd64 (1.12-1) ...
Selecting previously unselected package libxcb-glx0-dev:amd64.
Preparing to unpack .../44-libxcb-glx0-dev_1.12-1_amd64.deb ...
Unpacking libxcb-glx0-dev:amd64 (1.12-1) ...
Selecting previously unselected package x11proto-xext-dev.
Preparing to unpack .../45-x11proto-xext-dev_7.3.0-1_all.deb ...
Unpacking x11proto-xext-dev (7.3.0-1) ...
Selecting previously unselected package x11proto-fixes-dev.
Preparing to unpack .../46-x11proto-fixes-dev_1%3a5.0-2_all.deb ...
Unpacking x11proto-fixes-dev (1:5.0-2) ...
Selecting previously unselected package libxfixes-dev:amd64.
Preparing to unpack .../47-libxfixes-dev_1%3a5.0.3-1_amd64.deb ...
Unpacking libxfixes-dev:amd64 (1:5.0.3-1) ...
Selecting previously unselected package x11proto-damage-dev.
Preparing to unpack .../48-x11proto-damage-dev_1%3a1.2.1-2_all.deb ...
Unpacking x11proto-damage-dev (1:1.2.1-2) ...
Selecting previously unselected package libxdamage-dev:amd64.
Preparing to unpack .../49-libxdamage-dev_1%3a1.1.4-2+b3_amd64.deb ...
Unpacking libxdamage-dev:amd64 (1:1.1.4-2+b3) ...
Selecting previously unselected package libxext-dev:amd64.
Preparing to unpack .../50-libxext-dev_2%3a1.3.3-1+b2_amd64.deb ...
Unpacking libxext-dev:amd64 (2:1.3.3-1+b2) ...
Selecting previously unselected package x11proto-xf86vidmode-dev.
Preparing to unpack .../51-x11proto-xf86vidmode-dev_2.3.1-2_all.deb ...
Unpacking x11proto-xf86vidmode-dev (2.3.1-2) ...
Selecting previously unselected package libxxf86vm-dev:amd64.
Preparing to unpack .../52-libxxf86vm-dev_1%3a1.1.4-1+b2_amd64.deb ...
Unpacking libxxf86vm-dev:amd64 (1:1.1.4-1+b2) ...
Selecting previously unselected package x11proto-dri2-dev.
Preparing to unpack .../53-x11proto-dri2-dev_2.8-2_all.deb ...
Unpacking x11proto-dri2-dev (2.8-2) ...
Selecting previously unselected package x11proto-gl-dev.
Preparing to unpack .../54-x11proto-gl-dev_1.4.17-1_all.deb ...
Unpacking x11proto-gl-dev (1.4.17-1) ...
Selecting previously unselected package libgl1-mesa-dev:amd64.
Preparing to unpack .../55-libgl1-mesa-dev_13.0.6-1+b2_amd64.deb ...
Unpacking libgl1-mesa-dev:amd64 (13.0.6-1+b2) ...
Selecting previously unselected package libllvm3.9:amd64.
Preparing to unpack .../56-libllvm3.9_1%3a3.9.1-9_amd64.deb ...
Unpacking libllvm3.9:amd64 (1:3.9.1-9) ...
Selecting previously unselected package libsensors4:amd64.
Preparing to unpack .../57-libsensors4_1%3a3.4.0-4_amd64.deb ...
Unpacking libsensors4:amd64 (1:3.4.0-4) ...
Selecting previously unselected package libgl1-mesa-dri:amd64.
Preparing to unpack .../58-libgl1-mesa-dri_13.0.6-1+b2_amd64.deb ...
Unpacking libgl1-mesa-dri:amd64 (13.0.6-1+b2) ...
Selecting previously unselected package libx11-doc.
Preparing to unpack .../59-libx11-doc_2%3a1.6.4-3_all.deb ...
Unpacking libx11-doc (2:1.6.4-3) ...
Selecting previously unselected package libtxc-dxtn-s2tc:amd64.
Preparing to unpack .../60-libtxc-dxtn-s2tc_1.0+git20151227-2_amd64.deb ...
Unpacking libtxc-dxtn-s2tc:amd64 (1.0+git20151227-2) ...
Setting up libxcb-present0:amd64 (1.12-1) ...
Setting up x11proto-dri2-dev (2.8-2) ...
Setting up libxcb-dri2-0:amd64 (1.12-1) ...
Setting up libxcb-dri3-0:amd64 (1.12-1) ...
Setting up libxcb-glx0:amd64 (1.12-1) ...
Setting up libxcb-randr0:amd64 (1.12-1) ...
Setting up libxcb-xfixes0:amd64 (1.12-1) ...
Setting up libxcb-render0:amd64 (1.12-1) ...
Setting up libxfixes3:amd64 (1:5.0.3-1) ...
Setting up libpthread-stubs0-dev:amd64 (0.3-4) ...
Setting up libxshmfence1:amd64 (1.2-1+b2) ...
Setting up xorg-sgml-doctools (1:1.11-1) ...
Setting up libllvm3.9:amd64 (1:3.9.1-9) ...
Setting up x11proto-xf86vidmode-dev (2.3.1-2) ...
Setting up libtxc-dxtn-s2tc:amd64 (1.0+git20151227-2) ...
update-alternatives: using /usr/lib/x86_64-linux-gnu/s2tc/libtxc_dxtn.so to provide /usr/lib/x86_64-linux-gnu/libtxc_dxtn.so (libtxc-dxtn-x86_64-linux-gnu) in auto mode
Setting up x11proto-kb-dev (1.0.7-1) ...
Setting up libglapi-mesa:amd64 (13.0.6-1+b2) ...
Processing triggers for sgml-base (1.29) ...
Setting up libdrm2:amd64 (2.4.74-1) ...
Setting up libxcb-sync1:amd64 (1.12-1) ...
Setting up libx11-xcb1:amd64 (2:1.6.4-3) ...
Setting up xtrans-dev (1.3.5-1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up x11proto-gl-dev (1.4.17-1) ...
Setting up libx11-doc (2:1.6.4-3) ...
Setting up libpciaccess0:amd64 (0.13.4-1+b2) ...
Setting up libxcb-shape0:amd64 (1.12-1) ...
Setting up libsensors4:amd64 (1:3.4.0-4) ...
Setting up libdrm-radeon1:amd64 (2.4.74-1) ...
Setting up libxxf86vm1:amd64 (1:1.1.4-1+b2) ...
Setting up libdrm-nouveau2:amd64 (2.4.74-1) ...
Setting up x11proto-core-dev (7.0.31-1) ...
Setting up libxdamage1:amd64 (1:1.1.4-2+b3) ...
Setting up libdrm-amdgpu1:amd64 (2.4.74-1) ...
Setting up libxshmfence-dev:amd64 (1.2-1+b2) ...
Setting up libxau-dev:amd64 (1:1.0.8-1) ...
Setting up libdrm-intel1:amd64 (2.4.74-1) ...
Setting up libxdmcp-dev:amd64 (1:1.1.2-3) ...
Setting up libgl1-mesa-glx:amd64 (13.0.6-1+b2) ...
Setting up libxcb1-dev:amd64 (1.12-1) ...
Setting up libxcb-glx0-dev:amd64 (1.12-1) ...
Setting up x11proto-input-dev (2.3.2-1) ...
Setting up libxcb-sync-dev:amd64 (1.12-1) ...
Setting up libdrm-dev:amd64 (2.4.74-1) ...
Setting up libgl1-mesa-dri:amd64 (13.0.6-1+b2) ...
Setting up libxcb-dri2-0-dev:amd64 (1.12-1) ...
Setting up libxcb-render0-dev:amd64 (1.12-1) ...
Setting up libxcb-dri3-dev:amd64 (1.12-1) ...
Setting up x11proto-xext-dev (7.3.0-1) ...
Setting up libxcb-shape0-dev:amd64 (1.12-1) ...
Setting up libx11-dev:amd64 (2:1.6.4-3) ...
Setting up libxxf86vm-dev:amd64 (1:1.1.4-1+b2) ...
Setting up libx11-xcb-dev:amd64 (2:1.6.4-3) ...
Setting up libxcb-randr0-dev:amd64 (1.12-1) ...
Setting up mesa-common-dev:amd64 (13.0.6-1+b2) ...
Setting up libxcb-xfixes0-dev:amd64 (1.12-1) ...
Setting up x11proto-fixes-dev (1:5.0-2) ...
Setting up x11proto-damage-dev (1:1.2.1-2) ...
Setting up libxext-dev:amd64 (2:1.3.3-1+b2) ...
Setting up libxcb-present-dev:amd64 (1.12-1) ...
Setting up libxfixes-dev:amd64 (1:5.0.3-1) ...
Setting up libxdamage-dev:amd64 (1:1.1.4-2+b3) ...
Setting up libgl1-mesa-dev:amd64 (13.0.6-1+b2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...


13:57 | Impressed! | Voted(0) | Comment(0)
2018/04/12

可読性

Tweet ThisSend to Facebook | by kaizen
可読性を下げるかどうかは、処理したい内容によるかもしれません。

1)文字(数字)の並びに左から右などに意味があるかどうか。
2)シェルコマンド等のhead, tailなど前からの処理と後ろからの処理の対称性のある処理が必要かどうか。
3)言語処理で、接頭語、接尾語の処理

処理の対称性は、可逆性、単純性など可読性をあげる機能だと理解しています。
可読性は、変数名の選択、註釈の記入なども含めて、記述者の意図が分かりやすいかかも。

05:25 | Impressed! | Voted(0) | Comment(0)
2018/04/10

ch08 $ python train.py

Tweet ThisSend to Facebook | by kaizen

$ python train.py 

| epoch 1 |  iter 1 / 351 | time 0[s] | loss 4.08

| epoch 1 |  iter 21 / 351 | time 9[s] | loss 3.09

| epoch 1 |  iter 41 / 351 | time 19[s] | loss 1.90

| epoch 1 |  iter 61 / 351 | time 30[s] | loss 1.72

| epoch 1 |  iter 81 / 351 | time 41[s] | loss 1.46

| epoch 1 |  iter 101 / 351 | time 51[s] | loss 1.19

| epoch 1 |  iter 121 / 351 | time 62[s] | loss 1.14

| epoch 1 |  iter 141 / 351 | time 72[s] | loss 1.09

| epoch 1 |  iter 161 / 351 | time 83[s] | loss 1.06

| epoch 1 |  iter 181 / 351 | time 94[s] | loss 1.04

| epoch 1 |  iter 201 / 351 | time 103[s] | loss 1.03

| epoch 1 |  iter 221 / 351 | time 113[s] | loss 1.02

| epoch 1 |  iter 241 / 351 | time 122[s] | loss 1.02

| epoch 1 |  iter 261 / 351 | time 131[s] | loss 1.01

| epoch 1 |  iter 281 / 351 | time 140[s] | loss 1.00

| epoch 1 |  iter 301 / 351 | time 149[s] | loss 1.00

| epoch 1 |  iter 321 / 351 | time 158[s] | loss 1.00

| epoch 1 |  iter 341 / 351 | time 167[s] | loss 1.00

Q 10/15/94                     

T 1994-10-15

1978-08-11

---

Q thursday, november 13, 2008  

T 2008-11-13

1978-08-11

---

Q Mar 25, 2003                 

T 2003-03-25

1978-08-11

---

Q Tuesday, November 22, 2016   

T 2016-11-22

1978-08-11

---

Q Saturday, July 18, 1970      

T 1970-07-18

1978-08-11

---

Q october 6, 1992              

T 1992-10-06

1978-08-11

---

Q 8/23/08                      

T 2008-08-23

1978-08-11

---

Q 8/30/07                      

T 2007-08-30

1978-08-11

---

Q 10/28/13                     

T 2013-10-28

1978-08-11

---

Q sunday, november 6, 2016     

T 2016-11-06

1978-08-11

---

val acc 0.000%

| epoch 2 |  iter 1 / 351 | time 0[s] | loss 1.00

| epoch 2 |  iter 21 / 351 | time 9[s] | loss 1.00

| epoch 2 |  iter 41 / 351 | time 18[s] | loss 0.99

| epoch 2 |  iter 61 / 351 | time 27[s] | loss 0.99

| epoch 2 |  iter 81 / 351 | time 37[s] | loss 0.99

| epoch 2 |  iter 101 / 351 | time 47[s] | loss 0.99

| epoch 2 |  iter 121 / 351 | time 56[s] | loss 0.99

| epoch 2 |  iter 141 / 351 | time 66[s] | loss 0.98

| epoch 2 |  iter 161 / 351 | time 76[s] | loss 0.98

| epoch 2 |  iter 181 / 351 | time 86[s] | loss 0.97

| epoch 2 |  iter 201 / 351 | time 95[s] | loss 0.95

| epoch 2 |  iter 221 / 351 | time 106[s] | loss 0.94

| epoch 2 |  iter 241 / 351 | time 116[s] | loss 0.90

| epoch 2 |  iter 261 / 351 | time 128[s] | loss 0.83

| epoch 2 |  iter 281 / 351 | time 138[s] | loss 0.74

| epoch 2 |  iter 301 / 351 | time 149[s] | loss 0.66

| epoch 2 |  iter 321 / 351 | time 160[s] | loss 0.58

| epoch 2 |  iter 341 / 351 | time 171[s] | loss 0.46

Q 10/15/94                     

T 1994-10-15

1994-10-15

---

Q thursday, november 13, 2008  

T 2008-11-13

2006-11-13

---

Q Mar 25, 2003                 

T 2003-03-25

2003-03-25

---

Q Tuesday, November 22, 2016   

T 2016-11-22

2016-11-22

---

Q Saturday, July 18, 1970      

T 1970-07-18

1970-07-18

---

Q october 6, 1992              

T 1992-10-06

1992-10-06

---

Q 8/23/08                      

T 2008-08-23

2008-08-23

---

Q 8/30/07                      

T 2007-08-30

2007-08-09

---

Q 10/28/13                     

T 2013-10-28

1983-10-28

---

Q sunday, november 6, 2016     

T 2016-11-06

2016-11-08

---

val acc 51.640%

| epoch 3 |  iter 1 / 351 | time 0[s] | loss 0.35

| epoch 3 |  iter 21 / 351 | time 10[s] | loss 0.30

| epoch 3 |  iter 41 / 351 | time 22[s] | loss 0.21

| epoch 3 |  iter 61 / 351 | time 33[s] | loss 0.14

| epoch 3 |  iter 81 / 351 | time 43[s] | loss 0.09

| epoch 3 |  iter 101 / 351 | time 53[s] | loss 0.07

| epoch 3 |  iter 121 / 351 | time 64[s] | loss 0.05

| epoch 3 |  iter 141 / 351 | time 76[s] | loss 0.04

| epoch 3 |  iter 161 / 351 | time 86[s] | loss 0.03

| epoch 3 |  iter 181 / 351 | time 96[s] | loss 0.03

| epoch 3 |  iter 201 / 351 | time 106[s] | loss 0.02

| epoch 3 |  iter 221 / 351 | time 116[s] | loss 0.02

| epoch 3 |  iter 241 / 351 | time 126[s] | loss 0.02

| epoch 3 |  iter 261 / 351 | time 137[s] | loss 0.01

| epoch 3 |  iter 281 / 351 | time 149[s] | loss 0.01

| epoch 3 |  iter 301 / 351 | time 160[s] | loss 0.01

| epoch 3 |  iter 321 / 351 | time 170[s] | loss 0.01

| epoch 3 |  iter 341 / 351 | time 180[s] | loss 0.01

Q 10/15/94                     

T 1994-10-15

1994-10-15

---

Q thursday, november 13, 2008  

T 2008-11-13

2008-11-13

---

Q Mar 25, 2003                 

T 2003-03-25

2003-03-25

---

Q Tuesday, November 22, 2016   

T 2016-11-22

2016-11-22

---

Q Saturday, July 18, 1970      

T 1970-07-18

1970-07-18

---

Q october 6, 1992              

T 1992-10-06

1992-10-06

---

Q 8/23/08                      

T 2008-08-23

2008-08-23

---

Q 8/30/07                      

T 2007-08-30

2007-08-30

---

Q 10/28/13                     

T 2013-10-28

2013-10-28

---

Q sunday, november 6, 2016     

T 2016-11-06

2016-11-06

---

val acc 99.900%

| epoch 4 |  iter 1 / 351 | time 0[s] | loss 0.01

| epoch 4 |  iter 21 / 351 | time 10[s] | loss 0.01

| epoch 4 |  iter 41 / 351 | time 21[s] | loss 0.01

| epoch 4 |  iter 61 / 351 | time 31[s] | loss 0.01

| epoch 4 |  iter 81 / 351 | time 42[s] | loss 0.01

| epoch 4 |  iter 101 / 351 | time 52[s] | loss 0.01

| epoch 4 |  iter 121 / 351 | time 62[s] | loss 0.00

| epoch 4 |  iter 141 / 351 | time 73[s] | loss 0.01

| epoch 4 |  iter 161 / 351 | time 86[s] | loss 0.00

| epoch 4 |  iter 181 / 351 | time 95[s] | loss 0.00

| epoch 4 |  iter 201 / 351 | time 106[s] | loss 0.00

| epoch 4 |  iter 221 / 351 | time 120[s] | loss 0.00

| epoch 4 |  iter 241 / 351 | time 133[s] | loss 0.00

| epoch 4 |  iter 261 / 351 | time 145[s] | loss 0.00

^CTraceback (most recent call last):

  File "train.py", line 40, in <module>

    batch_size=batch_size, max_grad=max_grad)

  File "../common/trainer.py", line 40, in fit

    model.backward()

  File "../ch07/seq2seq.py", line 114, in backward

    dout = self.encoder.backward(dh)

  File "/Users/ogawakiyoshi/Downloads/deep-learning-from-scratch-2-master/ch08/attention_seq2seq.py", line 16, in backward

    dout = self.lstm.backward(dhs)

  File "../common/time_layers.py", line 211, in backward

    dx, dh, dc = layer.backward(dhs[:, t, :] + dh, dc)

KeyboardInterrupt



14:30 | Impressed! | Voted(0) | Comment(0)
2018/04/10

$ python train_seq2seq.py

Tweet ThisSend to Facebook | by kaizen

$ python train_seq2seq.py 

| epoch 1 |  iter 1 / 351 | time 0[s] | loss 2.56

| epoch 1 |  iter 21 / 351 | time 0[s] | loss 2.53

| epoch 1 |  iter 41 / 351 | time 1[s] | loss 2.17

| epoch 1 |  iter 61 / 351 | time 1[s] | loss 1.96

| epoch 1 |  iter 81 / 351 | time 2[s] | loss 1.92

| epoch 1 |  iter 101 / 351 | time 2[s] | loss 1.87

| epoch 1 |  iter 121 / 351 | time 3[s] | loss 1.85

| epoch 1 |  iter 141 / 351 | time 4[s] | loss 1.83

| epoch 1 |  iter 161 / 351 | time 4[s] | loss 1.79

| epoch 1 |  iter 181 / 351 | time 5[s] | loss 1.77

| epoch 1 |  iter 201 / 351 | time 5[s] | loss 1.77

| epoch 1 |  iter 221 / 351 | time 6[s] | loss 1.76

| epoch 1 |  iter 241 / 351 | time 7[s] | loss 1.76

| epoch 1 |  iter 261 / 351 | time 7[s] | loss 1.76

| epoch 1 |  iter 281 / 351 | time 8[s] | loss 1.75

| epoch 1 |  iter 301 / 351 | time 9[s] | loss 1.74

| epoch 1 |  iter 321 / 351 | time 9[s] | loss 1.75

| epoch 1 |  iter 341 / 351 | time 10[s] | loss 1.74

Q 77+85  

T 162 

100 

---

Q 975+164

T 1139

1000

---

Q 582+84 

T 666 

1000

---

Q 8+155  

T 163 

100 

---

Q 367+55 

T 422 

1000

---

Q 600+257

T 857 

1000

---

Q 761+292

T 1053

1000

---

Q 830+597

T 1427

1000

---

Q 26+838 

T 864 

1000

---

Q 143+93 

T 236 

100 

---

val acc 0.180%

| epoch 2 |  iter 1 / 351 | time 0[s] | loss 1.74

| epoch 2 |  iter 21 / 351 | time 0[s] | loss 1.73

| epoch 2 |  iter 41 / 351 | time 1[s] | loss 1.74

| epoch 2 |  iter 61 / 351 | time 2[s] | loss 1.74

| epoch 2 |  iter 81 / 351 | time 2[s] | loss 1.73

| epoch 2 |  iter 101 / 351 | time 3[s] | loss 1.73

| epoch 2 |  iter 121 / 351 | time 4[s] | loss 1.72

| epoch 2 |  iter 141 / 351 | time 4[s] | loss 1.71

| epoch 2 |  iter 161 / 351 | time 5[s] | loss 1.71

| epoch 2 |  iter 181 / 351 | time 6[s] | loss 1.71

| epoch 2 |  iter 201 / 351 | time 6[s] | loss 1.70

| epoch 2 |  iter 221 / 351 | time 7[s] | loss 1.71

| epoch 2 |  iter 241 / 351 | time 8[s] | loss 1.70

| epoch 2 |  iter 261 / 351 | time 9[s] | loss 1.69

| epoch 2 |  iter 281 / 351 | time 9[s] | loss 1.69

| epoch 2 |  iter 301 / 351 | time 10[s] | loss 1.69

| epoch 2 |  iter 321 / 351 | time 11[s] | loss 1.68

| epoch 2 |  iter 341 / 351 | time 12[s] | loss 1.67

Q 77+85  

T 162 

994 

---

Q 975+164

T 1139

1000

---

Q 582+84 

T 666 

700 

---

Q 8+155  

T 163 

100 

---

Q 367+55 

T 422 

400 

---

Q 600+257

T 857 

1000

---

Q 761+292

T 1053

1000

---

Q 830+597

T 1427

1544

---

Q 26+838 

T 864 

400 

---

Q 143+93 

T 236 

400 

---

val acc 0.220%

| epoch 3 |  iter 1 / 351 | time 0[s] | loss 1.66

| epoch 3 |  iter 21 / 351 | time 0[s] | loss 1.66

| epoch 3 |  iter 41 / 351 | time 1[s] | loss 1.65

| epoch 3 |  iter 61 / 351 | time 2[s] | loss 1.63

| epoch 3 |  iter 81 / 351 | time 3[s] | loss 1.62

| epoch 3 |  iter 101 / 351 | time 3[s] | loss 1.62

| epoch 3 |  iter 121 / 351 | time 4[s] | loss 1.60

| epoch 3 |  iter 141 / 351 | time 5[s] | loss 1.59

| epoch 3 |  iter 161 / 351 | time 5[s] | loss 1.57

| epoch 3 |  iter 181 / 351 | time 6[s] | loss 1.57

| epoch 3 |  iter 201 / 351 | time 6[s] | loss 1.56

| epoch 3 |  iter 221 / 351 | time 7[s] | loss 1.54

| epoch 3 |  iter 241 / 351 | time 7[s] | loss 1.52

| epoch 3 |  iter 261 / 351 | time 8[s] | loss 1.52

| epoch 3 |  iter 281 / 351 | time 9[s] | loss 1.52

| epoch 3 |  iter 301 / 351 | time 9[s] | loss 1.50

| epoch 3 |  iter 321 / 351 | time 10[s] | loss 1.49

| epoch 3 |  iter 341 / 351 | time 10[s] | loss 1.48

Q 77+85  

T 162 

108 

---

Q 975+164

T 1139

1001

---

Q 582+84 

T 666 

648 

---

Q 8+155  

T 163 

138 

---

Q 367+55 

T 422 

448 

---

Q 600+257

T 857 

848 

---

Q 761+292

T 1053

1011

---

Q 830+597

T 1427

1373

---

Q 26+838 

T 864 

868 

---

Q 143+93 

T 236 

348 

---

val acc 0.560%

| epoch 4 |  iter 1 / 351 | time 0[s] | loss 1.47

| epoch 4 |  iter 21 / 351 | time 0[s] | loss 1.46

| epoch 4 |  iter 41 / 351 | time 1[s] | loss 1.44

| epoch 4 |  iter 61 / 351 | time 1[s] | loss 1.43

| epoch 4 |  iter 81 / 351 | time 2[s] | loss 1.42

| epoch 4 |  iter 101 / 351 | time 3[s] | loss 1.41

| epoch 4 |  iter 121 / 351 | time 3[s] | loss 1.40

| epoch 4 |  iter 141 / 351 | time 4[s] | loss 1.40

| epoch 4 |  iter 161 / 351 | time 4[s] | loss 1.38

| epoch 4 |  iter 181 / 351 | time 5[s] | loss 1.38

| epoch 4 |  iter 201 / 351 | time 5[s] | loss 1.37

| epoch 4 |  iter 221 / 351 | time 6[s] | loss 1.35

| epoch 4 |  iter 241 / 351 | time 7[s] | loss 1.33

| epoch 4 |  iter 261 / 351 | time 7[s] | loss 1.33

| epoch 4 |  iter 281 / 351 | time 8[s] | loss 1.33

| epoch 4 |  iter 301 / 351 | time 8[s] | loss 1.32

| epoch 4 |  iter 321 / 351 | time 9[s] | loss 1.31

| epoch 4 |  iter 341 / 351 | time 9[s] | loss 1.30

Q 77+85  

T 162 

146 

---

Q 975+164

T 1139

1189

---

Q 582+84 

T 666 

666 

---

Q 8+155  

T 163 

162 

---

Q 367+55 

T 422 

432 

---

Q 600+257

T 857 

866 

---

Q 761+292

T 1053

1002

---

Q 830+597

T 1427

1406

---

Q 26+838 

T 864 

862 

---

Q 143+93 

T 236 

202 

---

val acc 1.060%

| epoch 5 |  iter 1 / 351 | time 0[s] | loss 1.28

| epoch 5 |  iter 21 / 351 | time 0[s] | loss 1.29

| epoch 5 |  iter 41 / 351 | time 1[s] | loss 1.28

| epoch 5 |  iter 61 / 351 | time 1[s] | loss 1.27

| epoch 5 |  iter 81 / 351 | time 2[s] | loss 1.27

| epoch 5 |  iter 101 / 351 | time 3[s] | loss 1.26

| epoch 5 |  iter 121 / 351 | time 3[s] | loss 1.26

| epoch 5 |  iter 141 / 351 | time 4[s] | loss 1.27

| epoch 5 |  iter 161 / 351 | time 5[s] | loss 1.26

| epoch 5 |  iter 181 / 351 | time 5[s] | loss 1.25

| epoch 5 |  iter 201 / 351 | time 6[s] | loss 1.23

| epoch 5 |  iter 221 / 351 | time 6[s] | loss 1.22

| epoch 5 |  iter 241 / 351 | time 7[s] | loss 1.21

| epoch 5 |  iter 261 / 351 | time 7[s] | loss 1.21

| epoch 5 |  iter 281 / 351 | time 8[s] | loss 1.21

| epoch 5 |  iter 301 / 351 | time 9[s] | loss 1.20

| epoch 5 |  iter 321 / 351 | time 9[s] | loss 1.19

| epoch 5 |  iter 341 / 351 | time 10[s] | loss 1.18

Q 77+85  

T 162 

145 

---

Q 975+164

T 1139

1168

---

Q 582+84 

T 666 

665 

---

Q 8+155  

T 163 

192 

---

Q 367+55 

T 422 

431 

---

Q 600+257

T 857 

895 

---

Q 761+292

T 1053

1015

---

Q 830+597

T 1427

1493

---

Q 26+838 

T 864 

891 

---

Q 143+93 

T 236 

221 

---



14:27 | Impressed! | Voted(0) | Comment(0)
2018/04/10

python generate_better_text.py

Tweet ThisSend to Facebook | by kaizen

$ python generate_better_text.py 

Traceback (most recent call last):

  File "generate_better_text.py", line 15, in <module>

    model.load_params('../ch06/BetterRnnlm.pkl')

  File "../common/base_model.py", line 35, in load_params

    raise IOError('No file: '' + file_name + ''')

OSError: No file:  + file_name + 



13:54 | Impressed! | Voted(0) | Comment(0)
2018/04/10

ch05 python train_custom_loop.py

Tweet ThisSend to Facebook | by kaizen

python train_custom_loop.py 

corpus size: 1000, vocabulary size: 418

| epoch 1 | perplexity 389.27

| epoch 2 | perplexity 266.08

| epoch 3 | perplexity 223.64

| epoch 4 | perplexity 215.45

| epoch 5 | perplexity 205.29

| epoch 6 | perplexity 203.73

| epoch 7 | perplexity 198.77

| epoch 8 | perplexity 194.69

| epoch 9 | perplexity 194.42

| epoch 10 | perplexity 189.83

| epoch 11 | perplexity 190.93

| epoch 12 | perplexity 190.12

| epoch 13 | perplexity 188.25

| epoch 14 | perplexity 190.16

| epoch 15 | perplexity 191.52

| epoch 16 | perplexity 185.70

| epoch 17 | perplexity 183.53

| epoch 18 | perplexity 183.42

| epoch 19 | perplexity 180.68

| epoch 20 | perplexity 181.16

| epoch 21 | perplexity 181.35

| epoch 22 | perplexity 178.72

| epoch 23 | perplexity 175.02

| epoch 24 | perplexity 174.39

| epoch 25 | perplexity 176.70

| epoch 26 | perplexity 175.35

| epoch 27 | perplexity 171.20

| epoch 28 | perplexity 168.53

| epoch 29 | perplexity 166.30

| epoch 30 | perplexity 159.77

| epoch 31 | perplexity 158.16

| epoch 32 | perplexity 159.38

| epoch 33 | perplexity 156.65

| epoch 34 | perplexity 153.54

| epoch 35 | perplexity 153.31

| epoch 36 | perplexity 146.37

| epoch 37 | perplexity 141.92

| epoch 38 | perplexity 138.65

| epoch 39 | perplexity 136.03

| epoch 40 | perplexity 134.03

| epoch 41 | perplexity 130.11

| epoch 42 | perplexity 123.92

| epoch 43 | perplexity 120.53

| epoch 44 | perplexity 122.00

| epoch 45 | perplexity 116.65

| epoch 46 | perplexity 110.75

| epoch 47 | perplexity 107.01

| epoch 48 | perplexity 104.10

| epoch 49 | perplexity 100.72

| epoch 50 | perplexity 94.68

| epoch 51 | perplexity 92.13

| epoch 52 | perplexity 88.72

| epoch 53 | perplexity 86.26

| epoch 54 | perplexity 80.63

| epoch 55 | perplexity 81.45

| epoch 56 | perplexity 74.96

| epoch 57 | perplexity 71.86

| epoch 58 | perplexity 67.72

| epoch 59 | perplexity 63.82

| epoch 60 | perplexity 61.90

| epoch 61 | perplexity 60.03

| epoch 62 | perplexity 58.33

| epoch 63 | perplexity 53.45

| epoch 64 | perplexity 51.14

| epoch 65 | perplexity 49.04

| epoch 66 | perplexity 47.83

| epoch 67 | perplexity 44.75

| epoch 68 | perplexity 40.76

| epoch 69 | perplexity 39.35

| epoch 70 | perplexity 37.07

| epoch 71 | perplexity 36.68

| epoch 72 | perplexity 33.92

| epoch 73 | perplexity 33.07

| epoch 74 | perplexity 31.97

| epoch 75 | perplexity 29.50

| epoch 76 | perplexity 28.50

| epoch 77 | perplexity 28.28

| epoch 78 | perplexity 25.74

| epoch 79 | perplexity 24.14

| epoch 80 | perplexity 24.11

| epoch 81 | perplexity 23.86

| epoch 82 | perplexity 21.30

| epoch 83 | perplexity 19.46

| epoch 84 | perplexity 18.67

| epoch 85 | perplexity 18.75

| epoch 86 | perplexity 17.13

| epoch 87 | perplexity 16.16

| epoch 88 | perplexity 15.30

| epoch 89 | perplexity 14.32

| epoch 90 | perplexity 13.26

| epoch 91 | perplexity 13.05

| epoch 92 | perplexity 14.09

| epoch 93 | perplexity 11.98

| epoch 94 | perplexity 11.21

| epoch 95 | perplexity 10.63

| epoch 96 | perplexity 10.57

| epoch 97 | perplexity 10.66

| epoch 98 | perplexity 9.75

| epoch 99 | perplexity 9.22

| epoch 100 | perplexity 8.39



13:29 | Impressed! | Voted(0) | Comment(0)
2018/04/10

ch 06 python train_better_rnnlm.py

Tweet ThisSend to Facebook | by kaizen

python train_better_rnnlm.py 

Downloading ptb.valid.txt ... 

Done

| epoch 1 |  iter 1 / 1327 | time 3[s] | perplexity 10000.18

| epoch 1 |  iter 21 / 1327 | time 76[s] | perplexity 3717.95

| epoch 1 |  iter 41 / 1327 | time 138[s] | perplexity 2059.69

| epoch 1 |  iter 61 / 1327 | time 202[s] | perplexity 1303.11

| epoch 1 |  iter 81 / 1327 | time 265[s] | perplexity 1049.33

| epoch 1 |  iter 101 / 1327 | time 333[s] | perplexity 829.57

| epoch 1 |  iter 121 / 1327 | time 402[s] | perplexity 773.14

| epoch 1 |  iter 141 / 1327 | time 468[s] | perplexity 732.46

| epoch 1 |  iter 161 / 1327 | time 512[s] | perplexity 708.99

| epoch 1 |  iter 181 / 1327 | time 576[s] | perplexity 698.57

| epoch 1 |  iter 201 / 1327 | time 638[s] | perplexity 582.02

| epoch 1 |  iter 221 / 1327 | time 697[s] | perplexity 589.58

| epoch 1 |  iter 241 / 1327 | time 757[s] | perplexity 530.04

| epoch 1 |  iter 261 / 1327 | time 817[s] | perplexity 545.48

| epoch 1 |  iter 281 / 1327 | time 872[s] | perplexity 521.58

| epoch 1 |  iter 301 / 1327 | time 932[s] | perplexity 454.81


Traceback (most recent call last):

  File "train_better_rnnlm.py", line 41, in <module>

    time_size=time_size, max_grad=max_grad)

  File "../common/trainer.py", line 111, in fit

    model.backward()

  File "/Users/ogawakiyoshi/Downloads/deep-learning-from-scratch-2-master/ch06/better_rnnlm.py", line 66, in backward

    dout = layer.backward(dout)

  File "../common/time_layers.py", line 211, in backward

    dx, dh, dc = layer.backward(dhs[:, t, :] + dh, dc)

  File "../common/time_layers.py", line 155, in backward

    dWx = np.dot(x.T, dA)

KeyboardInterrupt



13:21 | Impressed! | Voted(0) | Comment(0)
12345Next