See https://github.com/romainl/vim-rnb for an up-to-date version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gc | |
| import torch | |
| ## MEM utils ## | |
| def mem_report(): | |
| '''Report the memory usage of the tensor.storage in pytorch | |
| Both on CPUs and GPUs are reported''' | |
| def _mem_report(tensors, mem_type): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2011 Red Hat, Inc; 2016 Joel Ong | |
| * | |
| * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, but | |
| * WITHOUT ANY WARRANTY; without even the implied warranty of |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| nsb_entropy.py | |
| June, 2011 written by Sungho Hong, Computational Neuroscience Unit, Okinawa Institute of | |
| Science and Technology | |
| May, 2019 updated to Python 3 by Charlie Strauss, Los Alamos National Lab | |
| This script is a python version of Mathematica functions by Christian Mendl |