{"id":221,"date":"2014-09-02T02:34:42","date_gmt":"2014-09-01T17:34:42","guid":{"rendered":"https:\/\/www.dogrow.net\/python\/?p=221"},"modified":"2019-10-19T08:58:40","modified_gmt":"2019-10-18T23:58:40","slug":"blog53","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/python\/blog53\/","title":{"rendered":"(53) theano\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>Python\u7528\u306e\u6570\u5024\u8a08\u7b97\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308b theano \u3092\u4f7f\u3063\u3066\u307f\u308b\u3002<br \/>\ntheano\u3067\u306f\u3001\u30b7\u30f3\u30dc\u30eb\u3092\u4f7f\u3063\u3066\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u8907\u96d1\u306a\u51e6\u7406\u3092\u7c21\u6f54\u306b\u8868\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<br \/>\n\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306f\u3053\u3061\u3089\uff08\u2193\uff09<br \/>\n<a title=\"http:\/\/deeplearning.net\/software\/theano\/\" href=\"http:\/\/deeplearning.net\/software\/theano\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/deeplearning.net\/software\/theano\/<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-229\" src=\"https:\/\/www.dogrow.net\/python\/wp-content\/uploads\/2014\/09\/20140902_01.png\" alt=\"20140902_01\" width=\"480\" height=\"298\" srcset=\"https:\/\/www.dogrow.net\/python\/wp-content\/uploads\/2014\/09\/20140902_01.png 480w, https:\/\/www.dogrow.net\/python\/wp-content\/uploads\/2014\/09\/20140902_01-300x186.png 300w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>\u81ea\u5206\u306e\u74b0\u5883\u306f CentOS 6.5\u3060\u304c\u3001\u5e78\u904b\u306b\u3082\u4e0a\u8a18\u306e\u516c\u5f0f\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306bCentOS6\u7528\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u304c\u8a18\u3057\u3066\u3042\u3063\u305f\uff01<br \/>\n<a title=\"http:\/\/deeplearning.net\/software\/theano\/install_centos6.html#install-centos6\" href=\"http:\/\/deeplearning.net\/software\/theano\/install_centos6.html#install-centos6\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/deeplearning.net\/software\/theano\/install_centos6.html#install-centos6<\/a><\/p>\n<p>\u81ea\u5206\u306e\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u3044\u3082\u306e\u3092\u3001\u66f8\u304b\u308c\u3066\u3044\u308b\u901a\u308a\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<p>\u307e\u305a\u306fPyCUDA\u306a\u308b\u3082\u306e\u3001Python\u304b\u3089CUDA\u3092\u4f7f\u3046\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<br \/>\ntheano\u306fGPU\u3092\u4f7f\u3063\u305f\u9ad8\u901f\u6f14\u7b97\u306e\u624b\u6bb5\u3068\u3057\u3066\u3053\u308c\u3092\u4f7f\u3046\u3088\u3046\u3060\u3002<\/p>\n<pre>$ git clone --recursive http:\/\/git.tiker.net\/trees\/pycuda.git\r\n$ .\/configure.py --boost-inc-dir=\/usr\/local\/boost\/include --boost-lib-dir=\/usr\/local\/boost\/lib\r\n$ make\r\n# sudo make install\r\n<\/pre>\n<p>\u6b21\u306btheano\u672c\u4f53\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre># easy_install pip\r\n# pip install Theano\r\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306e\u52d5\u4f5c\u78ba\u8a8d\u3092\u3057\u3066\u304a\u304f\u3002<\/p>\n<pre>$ python -c \"import theano; theano.test()\"\r\n<\/pre>\n<p>\u3053\u306e\u51e6\u7406\u306b\u306f Intel Xeon X5570x2\u30de\u30b7\u30f3\u3067 7018.877\u79d2\u3092\u8981\u3057\u305f\u3002<\/p>\n<p>\u30c6\u30b9\u30c8\u306e\u7d50\u679c&#8230;<br \/>\n<span class=\"my_fc_crimsonBBig\">\u30a8\u30e9\u30fc\u304c\u305f\u304f\u3055\u3093\u767a\u751f (T^T)<\/span><\/p>\n<pre>======================================================================\r\nERROR: test_none (theano.compile.tests.test_function_module.T_function)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/compile\/tests\/test_function_module.py\", line 42, in test_none\r\n    raise KnownFailureTest('See #254: Using None as function output leads to [] return value')\r\nKnownFailureTest: See #254: Using None as function output leads to [] return value\r\n\r\n======================================================================\r\nERROR: test002_generator_one_scalar_output (theano.sandbox.scan_module.tests.test_scan.TestScan)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/sandbox\/scan_module\/tests\/test_scan.py\", line 474, in test002_generator_one_scalar_output\r\n    raise KnownFailureTest('Work-in-progress sandbox ScanOp is not fully '\r\nKnownFailureTest: Work-in-progress sandbox ScanOp is not fully functional yet\r\n\r\n======================================================================\r\nERROR: test003_one_sequence_one_output_and_weights (theano.sandbox.scan_module.tests.test_scan.TestScan)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/sandbox\/scan_module\/tests\/test_scan.py\", line 512, in test003_one_sequence_one_output_and_weights\r\n    raise KnownFailureTest('Work-in-progress sandbox ScanOp is not fully '\r\nKnownFailureTest: Work-in-progress sandbox ScanOp is not fully functional yet\r\n\r\n======================================================================\r\nERROR: test_alloc_inputs2 (theano.scan_module.tests.test_scan.T_Scan)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/scan_module\/tests\/test_scan.py\", line 2844, in test_alloc_inputs2\r\n    \"This tests depends on an optimization for scan \"\r\nKnownFailureTest: This tests depends on an optimization for scan that has not been implemented yet.\r\n\r\n======================================================================\r\nERROR: test_infershape_seq_shorter_nsteps (theano.scan_module.tests.test_scan.T_Scan)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/scan_module\/tests\/test_scan.py\", line 3040, in test_infershape_seq_shorter_nsteps\r\n    raise KnownFailureTest('This is a generic problem with infershape'\r\nKnownFailureTest: This is a generic problem with infershape that has to be discussed and figured out\r\n\r\n======================================================================\r\nERROR: test_outputs_info_not_typed (theano.scan_module.tests.test_scan.T_Scan)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/numpy-1.8.2-py2.7-linux-x86_64.egg\/numpy\/testing\/decorators.py\", line 213, in knownfailer\r\n    raise KnownFailureTest(msg)\r\nKnownFailureTest: This test fails because not typed outputs_info are always gived the smallest dtype. There is no upcast of outputs_info in scan for now.\r\n\r\n======================================================================\r\nERROR: test_arithmetic_cast (theano.tensor.tests.test_basic.test_arithmetic_cast)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/tensor\/tests\/test_basic.py\", line 5583, in test_arithmetic_cast\r\n    raise KnownFailureTest('Known issue with '\r\nKnownFailureTest: Known issue with numpy &gt;= 1.6.x see #761\r\n\r\n======================================================================\r\nERROR: test_abs_grad (theano.tensor.tests.test_complex.TestRealImag)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/numpy-1.8.2-py2.7-linux-x86_64.egg\/numpy\/testing\/decorators.py\", line 213, in knownfailer\r\n    raise KnownFailureTest(msg)\r\nKnownFailureTest: Complex grads not enabled, see #178\r\n\r\n======================================================================\r\nERROR: test_complex_grads (theano.tensor.tests.test_complex.TestRealImag)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/numpy-1.8.2-py2.7-linux-x86_64.egg\/numpy\/testing\/decorators.py\", line 213, in knownfailer\r\n    raise KnownFailureTest(msg)\r\nKnownFailureTest: Complex grads not enabled, see #178\r\n\r\n======================================================================\r\nERROR: test_mul_mixed (theano.tensor.tests.test_complex.TestRealImag)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/numpy-1.8.2-py2.7-linux-x86_64.egg\/numpy\/testing\/decorators.py\", line 213, in knownfailer\r\n    raise KnownFailureTest(msg)\r\nKnownFailureTest: Complex grads not enabled, see #178\r\n\r\n======================================================================\r\nERROR: test_mul_mixed0 (theano.tensor.tests.test_complex.TestRealImag)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/numpy-1.8.2-py2.7-linux-x86_64.egg\/numpy\/testing\/decorators.py\", line 213, in knownfailer\r\n    raise KnownFailureTest(msg)\r\nKnownFailureTest: Complex grads not enabled, see #178\r\n\r\n======================================================================\r\nERROR: test_mul_mixed1 (theano.tensor.tests.test_complex.TestRealImag)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/numpy-1.8.2-py2.7-linux-x86_64.egg\/numpy\/testing\/decorators.py\", line 213, in knownfailer\r\n    raise KnownFailureTest(msg)\r\nKnownFailureTest: Complex grads not enabled, see #178\r\n\r\n======================================================================\r\nERROR: test_polar_grads (theano.tensor.tests.test_complex.TestRealImag)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/numpy-1.8.2-py2.7-linux-x86_64.egg\/numpy\/testing\/decorators.py\", line 213, in knownfailer\r\n    raise KnownFailureTest(msg)\r\nKnownFailureTest: Complex grads not enabled, see #178\r\n\r\n======================================================================\r\nERROR: test_gradient (theano.tensor.tests.test_fourier.TestFourier)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/numpy-1.8.2-py2.7-linux-x86_64.egg\/numpy\/testing\/decorators.py\", line 213, in knownfailer\r\n    raise KnownFailureTest(msg)\r\nKnownFailureTest: Complex grads not enabled, see #178\r\n\r\n======================================================================\r\nERROR: theano.tensor.tests.test_opt.test_log_add\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/nose-1.3.4-py2.7.egg\/nose\/case.py\", line 197, in runTest\r\n    self.test(*self.arg)\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/tensor\/tests\/test_opt.py\", line 1508, in test_log_add\r\n    raise KnownFailureTest(('log(add(exp)) is not stabilized when adding '\r\nKnownFailureTest: log(add(exp)) is not stabilized when adding more than 2 elements, see #623\r\n\r\n======================================================================\r\nERROR: Currently Theano enable the constant_folding optimization before stabilization optimization.\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/nose-1.3.4-py2.7.egg\/nose\/case.py\", line 197, in runTest\r\n    self.test(*self.arg)\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/tensor\/tests\/test_opt.py\", line 3068, in test_constant_get_stabilized\r\n    \"Theano optimizes constant before stabilization. \"\r\nKnownFailureTest: Theano optimizes constant before stabilization. This breaks stabilization optimization in some cases. See #504.\r\n\r\n======================================================================\r\nERROR: test_dot (theano.tests.test_rop.test_RopLop)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/tests\/test_rop.py\", line 277, in test_dot\r\n    self.check_rop_lop(tensor.dot(self.x, W), self.in_shape)\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/tests\/test_rop.py\", line 191, in check_rop_lop\r\n    raise KnownFailureTest(\"Rop doesn't handle non-differentiable \"\r\nKnownFailureTest: Rop doesn't handle non-differentiable inputs correctly. Bug exposed by fixing Add.grad method.\r\n\r\n======================================================================\r\nERROR: test_elemwise0 (theano.tests.test_rop.test_RopLop)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/tests\/test_rop.py\", line 280, in test_elemwise0\r\n    self.check_rop_lop((self.x + 1) ** 2, self.in_shape)\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/tests\/test_rop.py\", line 191, in check_rop_lop\r\n    raise KnownFailureTest(\"Rop doesn't handle non-differentiable \"\r\nKnownFailureTest: Rop doesn't handle non-differentiable inputs correctly. Bug exposed by fixing Add.grad method.\r\n\r\n======================================================================\r\nFAIL: theano.sandbox.cuda.tests.test_mlp.test_run_nnet\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/nose-1.3.4-py2.7.egg\/nose\/case.py\", line 197, in runTest\r\n    self.test(*self.arg)\r\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/theano\/sandbox\/cuda\/tests\/test_mlp.py\", line 149, in test_run_nnet\r\n    rel_diff.max(), n_in, n_hid)\r\nAssertionError: ('max_abs_diff, max_rel_diff, n_in, n_hid', 0.0036473274, 0.00036355073, 2048, 4096)\r\n\r\n----------------------------------------------------------------------\r\nRan 2802 tests in 7018.877s\r\n\r\nFAILED (errors=18, failures=1)\r\n<\/pre>\n<p>\u4ee5\u4e0b\u306etheano-users\u63b2\u793a\u677f\u306e\u3084\u308a\u53d6\u308a\u3092\u898b\u308b\u3068\u3001\u3053\u308c\u3089\u306e\u30a8\u30e9\u30fc\u306f\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u5074\u306b\u539f\u56e0\u304c\u3042\u308b\u306e\u3067\u3001\u7121\u8996\u3057\u3066\u3088\u3044\u3068\u306e\u3053\u3068\u3002<br \/>\n<a title=\"https:\/\/groups.google.com\/forum\/#!topic\/theano-users\/1SPWQZEW-jI\" href=\"https:\/\/groups.google.com\/forum\/#!topic\/theano-users\/1SPWQZEW-jI\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/groups.google.com\/forum\/#!topic\/theano-users\/1SPWQZEW-jI<\/a><br \/>\n<a title=\"https:\/\/groups.google.com\/forum\/#!topic\/theano-users\/t0MIiyv3ibQ\" href=\"https:\/\/groups.google.com\/forum\/#!topic\/theano-users\/t0MIiyv3ibQ\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/groups.google.com\/forum\/#!topic\/theano-users\/t0MIiyv3ibQ<\/a><\/p>\n<p><span class=\"my_fc_deeppinkBBig\">memo<\/span><br \/>\n\u3053\u308c\u304b\u3089\u62dd\u898b\u3057\u3066\u52c9\u5f37\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u30b5\u30a4\u30c8\u3092\u30e1\u30e2\u3057\u3066\u304a\u304f\u3002<br \/>\n<a title=\"http:\/\/qiita.com\/mokemokechicken\/items\/3fbf6af714c1f66f99e9\" href=\"http:\/\/qiita.com\/mokemokechicken\/items\/3fbf6af714c1f66f99e9\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/qiita.com\/mokemokechicken\/items\/3fbf6af714c1f66f99e9<\/a><br \/>\n<a title=\"http:\/\/www.chino-js.com\/ja\/tech\/theano-rbm\/\" href=\"http:\/\/www.chino-js.com\/ja\/tech\/theano-rbm\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.chino-js.com\/ja\/tech\/theano-rbm\/<\/a><\/p>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>Python\u7528\u306e\u6570\u5024\u8a08\u7b97\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308b theano \u3092\u4f7f\u3063\u3066\u307f\u308b\u3002 theano\u3067\u306f\u3001\u30b7\u30f3\u30dc\u30eb\u3092\u4f7f\u3063\u3066\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u3001\u8907\u96d1\u306a\u51e6\u7406\u3092\u7c21\u6f54\u306b\u8868\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 \u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306f\u3053\u3061\u3089\uff08\u2193\uff09 http:\/\/de\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/python\/blog53\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-theano"],"views":3407,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":16,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":2661,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/posts\/221\/revisions\/2661"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/python\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}