{ "info": { "author": "nake nat", "author_email": "nakanat.stock@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "[![Build Status](https://travis-ci.org/neka-nat/tensorboard-chainer.svg?branch=master)](https://travis-ci.org/neka-nat/tensorboard-chainer)\n[![codecov](https://codecov.io/gh/neka-nat/tensorboard-chainer/branch/master/graph/badge.svg)](https://codecov.io/gh/neka-nat/tensorboard-chainer)\n\n[![Code Climate](https://codeclimate.com/github/neka-nat/tensorboard-chainer/badges/gpa.svg)](https://codeclimate.com/github/neka-nat/tensorboard-chainer)\n\n[![PyPI version](https://badge.fury.io/py/tensorboard-chainer.svg)](https://badge.fury.io/py/tensorboard-chainer)\n\n# tensorboard-chainer\n\nWrite tensorboard events with simple command.\nincluding scalar, image, histogram, audio, text, graph and embedding.\n\nThis is based on [tensorboard-pytorch](https://github.com/lanpa/tensorboard-pytorch).\n\n## Usage\n\nInstall tensorflow.\n\n```\npip install tensorflow\n```\n\nExecute demo.py and tensorboard.\nAccess \"localhost:6006\" in your browser.\n\n```\ncd examples\npython demo.py\ntensorboard --logdir runs\n```\n\n## Scalar example\n\n![graph](https://raw.githubusercontent.com/neka-nat/tensorboard-chainer/master/screenshots/scalar.png)\n\n## Histogram example\n\n![graph](https://raw.githubusercontent.com/neka-nat/tensorboard-chainer/master/screenshots/histogram.png)\n\n## Graph example\n\n![graph](https://raw.githubusercontent.com/neka-nat/tensorboard-chainer/master/screenshots/graph.gif)\n\n## Name scope\n\nLike tensorflow, nodes in the graph can be grouped together in the namespace to make it easy to see.\n\n```python\nimport chainer\nimport chainer.functions as F\nimport chainer.links as L\nfrom tb_chainer import name_scope, within_name_scope\n\nclass MLP(chainer.Chain):\n def __init__(self, n_units, n_out):\n super(MLP, self).__init__()\n with self.init_scope():\n self.l1 = L.Linear(None, n_units) # n_in -> n_units\n self.l2 = L.Linear(None, n_units) # n_units -> n_units\n self.l3 = L.Linear(None, n_out) # n_units -> n_out\n\n @within_name_scope('MLP')\n def __call__(self, x):\n with name_scope('linear1', self.l1.params()):\n h1 = F.relu(self.l1(x))\n with name_scope('linear2', self.l2.params()):\n h2 = F.relu(self.l2(h1))\n with name_scope('linear3', self.l3.params()):\n o = self.l3(h2)\n return o\n```\n\nHow to save the logs using this model is shown below.\n`add_all_variable_images` is the function that saves the Variable's data in the model that matches the pattern as an images.\n`add_all_parameter_histograms` is the function that save histograms of the Parameter's data in the model that match the pattern.\n\n```python\nfrom datetime import datetime\nfrom tb_chainer import SummaryWriter\n\nmodel = L.Classifier(MLP(1000, 10))\n\nres = model(chainer.Variable(np.random.rand(1, 784).astype(np.float32)),\n chainer.Variable(np.random.rand(1).astype(np.int32)))\n\nwriter = SummaryWriter('runs/'+datetime.now().strftime('%B%d %H:%M:%S'))\nwriter.add_graph([res])\nwriter.add_all_variable_images([res], pattern='.*MLP.*')\nwriter.add_all_parameter_histograms([res], pattern='.*MLP.*')\n\nwriter.close()\n```\n\n## Reference\n\n* [tensorboard-pytorch](https://github.com/lanpa/tensorboard-pytorch)\n* [tensorboard_logger](https://github.com/TeamHG-Memex/tensorboard_logger)\n* [tfchain](https://github.com/mitmul/tfchain)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/neka-nat/tensorboard-chainer", "keywords": "", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "tensorboard-chainer", "package_url": "https://pypi.org/project/tensorboard-chainer/", "platform": "", "project_url": "https://pypi.org/project/tensorboard-chainer/", "project_urls": { "Homepage": "https://github.com/neka-nat/tensorboard-chainer" }, "release_url": "https://pypi.org/project/tensorboard-chainer/0.4.0/", "requires_dist": null, "requires_python": "", "summary": "Log TensorBoard events with chainer", "version": "0.4.0" }, "last_serial": 4918760, "releases": { "0.4.0": [ { "comment_text": "", "digests": { "md5": "19bd0536e2c57ca3e523bf61afaef85d", "sha256": "2e8ca269f60e7d455ed41cce6a8c529eed4055d07ba675a366702b8cecc0a1ed" }, "downloads": -1, "filename": "tensorboard-chainer-0.4.0.tar.gz", "has_sig": false, "md5_digest": "19bd0536e2c57ca3e523bf61afaef85d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28383, "upload_time": "2019-03-09T13:07:30", "url": "https://files.pythonhosted.org/packages/08/ab/17dbc4b86b3d9dfc77b3a0e19c0b40ae4ea4e6f1c476ffce07ce3cf0d576/tensorboard-chainer-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "19bd0536e2c57ca3e523bf61afaef85d", "sha256": "2e8ca269f60e7d455ed41cce6a8c529eed4055d07ba675a366702b8cecc0a1ed" }, "downloads": -1, "filename": "tensorboard-chainer-0.4.0.tar.gz", "has_sig": false, "md5_digest": "19bd0536e2c57ca3e523bf61afaef85d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28383, "upload_time": "2019-03-09T13:07:30", "url": "https://files.pythonhosted.org/packages/08/ab/17dbc4b86b3d9dfc77b3a0e19c0b40ae4ea4e6f1c476ffce07ce3cf0d576/tensorboard-chainer-0.4.0.tar.gz" } ] }