Usually, located at /usr/local/cuda/bin
$ nvprof python train_mnist.py
I prefer to use --print-gpu-trace.
Install Pylint
from Install. If you have anaconda already installed use pip install -U pylint
to update the Pylint
so that pyreverse
is added to the scripts folder.
You need to install Graphviz as the pyreverse generates the UML diagrams in dot format and needs the dot.exe provided by Graphviz. Once Graphviz is installed make sure the bin folder is added to the PATH
variable so that pyreverse can find it at run time. "the command pyreverse generates the diagrams in all formats that graphviz/dot knows." (Reference
Now add the path of python modules for which you want to generate the documentation to PYTHONPATH.
Use pyreverse -S <modulename> to generate dot files in the current folder
Usage:
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
/etc/ssh/sshd_config
file by running the command sudo vi /etc/ssh/sshd_config
and do the following
Port
to 2222 (or any other port above 1000)PasswordAuthentication
to yes. This can be changed back to no if ssh keys are setup.sudo service ssh --full-restart
import torch as th | |
class NLL_OHEM(th.nn.NLLLoss): | |
""" Online hard example mining. | |
Needs input from nn.LogSotmax() """ | |
def __init__(self, ratio): | |
super(NLL_OHEM, self).__init__(None, True) | |
self.ratio = ratio |
def make_one_hot(labels, C=2): | |
''' | |
Converts an integer label torch.autograd.Variable to a one-hot Variable. | |
Parameters | |
---------- | |
labels : torch.autograd.Variable of torch.cuda.LongTensor | |
N x 1 x H x W, where N is batch size. | |
Each value is an integer representing correct classification. | |
C : integer. |
""" | |
Train a neural network to implement the discrete Fourier transform | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from tensorflow.keras.layers import Dense | |
from tensorflow.keras.models import Sequential | |
N = 32 | |
batch = 10000 |
I always end up getting this wrong; steps below worked for Linux Mint 19.3 (based on Ubuntu 18.04).
Build/installation order is important; JPEG 2000 support in ImageMagick only works if OpenJPEG is
found at build time, so we have to start with that. Note that for OpenJPEG an 'openjpeg-dev' Debian package exists.
As I'm not entirely sure this is the most up-to-date version, and JPEG 2000 support is important for me, I'm compiling
this library from the sources here. Otherwise everything under the 'OpenJPEG' could probably be subsituted by the
one-liner sudo at-get install openjpeg-dev
).