{"id":3751,"date":"2017-04-03T16:29:54","date_gmt":"2017-04-03T16:29:54","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=3751"},"modified":"2018-10-22T09:58:46","modified_gmt":"2018-10-22T09:58:46","slug":"chainer","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/chainer\/","title":{"rendered":"Chainer"},"content":{"rendered":"<h2>Overview<\/h2>\n<p><a href=\"http:\/\/chainer.org\/\">Chainer<\/a> is a flexible framework for neural networks in Python. Chainer adopts a <em>Define-by-Run<\/em> scheme, i.e., the network is defined on-the-fly via the actual forward computation.<\/p>\n<p>Version 1.22.0 and 3.2.0 is installed on the CSF. It is a CPU-only build &#8211; <em>no<\/em> support for GPU usage is available.<\/p>\n<h2>Restrictions on use<\/h2>\n<p>There are no access restrictions on the CSF.<\/p>\n<h2>Set up procedure<\/h2>\n<p>To access the software you must first load the relevant modulefile:<\/p>\n<pre>\r\nmodule load apps\/gcc\/python-packages\/anaconda3-4.2.0\/chainer\/4.2.0\r\nmodule load apps\/gcc\/python-packages\/anaconda3-4.2.0\/chainer\/3.2.0\r\nmodule load apps\/gcc\/python-packages\/anaconda3-4.2.0\/chainer\/1.22.0\r\n<\/pre>\n<p>This will automatically load the Anaconda3 v4.2.0 Python module files (which provides python 3.5.2).<\/p>\n<h2>Running the application<\/h2>\n<p>Please do not run Chainer on the login node. Work should be submitted to batch.<\/p>\n<h3>Serial batch job submission<\/h3>\n<p>Make sure you have the Chainer modulefile loaded then create a batch submission script, for example:<\/p>\n<pre>#!\/bin\/bash\r\n#$ -cwd                   # Run job from directory where submitted\r\n#$ -V                     # Inherit environment (modulefile) settings\r\n\r\npython my_chainer_code.py\r\n<\/pre>\n<p>Submit your jobscript from the login node using<\/p>\n<pre>qsub <em>jobscript<\/em>\r\n<\/pre>\n<p>where <code><em>jobscript<\/em><\/code> is the name of your jobscript.<\/p>\n<h2>Interactive usage example<\/h2>\n<p>The following example runs one of the Chainer example scripts interactively on a compute node. You could also submit this to the batch system by placing the commands to execute the python scripts in a jobscript.<\/p>\n<p>The Chainer examples are installed in the directory<\/p>\n<pre>$CHAINER_EXAMPLES\r\n<\/pre>\n<p>For example, to see the <code>mnist<\/code> files:<\/p>\n<pre>ls $CHAINER_EXAMPLES\/mnist\/\r\n<\/pre>\n<h3>Interactive Serial Job Example<\/h3>\n<p>To run the mnist example interactively on a compute node, do the following from the login node:<\/p>\n<pre># This command is run on the login node\r\nqrsh -l inter -l short\r\n\r\n# Wait until you are logged in to a compute node, then\r\nmodule load apps\/gcc\/python-packages\/anaconda3-4.2.0\/chainer\/1.22.0\r\n\r\n# The example will download some data, so run in your scratch area\r\ncd ~\/scratch\r\n\r\n# Run the example code on the CPU \r\n$CHAINER_EXAMPLES\/mnist\/train_mnist.py\r\n    #\r\n    #\r\n    #\r\n    # The example will download data then process it on the CPU.\r\n\r\n# Return to the login node when done to free the compute node for another user\r\nexit\r\n<\/pre>\n<h2>Further info<\/h2>\n<ul>\n<li><a href=\"http:\/\/chainer.org\/\">Chainer website<\/a><\/li>\n<\/ul>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Chainer is a flexible framework for neural networks in Python. Chainer adopts a Define-by-Run scheme, i.e., the network is defined on-the-fly via the actual forward computation. Version 1.22.0 and 3.2.0 is installed on the CSF. It is a CPU-only build &#8211; no support for GPU usage is available. Restrictions on use There are no access restrictions on the CSF. Set up procedure To access the software you must first load the relevant modulefile: module.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/chainer\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3751","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/3751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=3751"}],"version-history":[{"count":6,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/3751\/revisions"}],"predecessor-version":[{"id":4876,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/3751\/revisions\/4876"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/31"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/media?parent=3751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}