Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Train on MNIST with keras API:

Code Block
python3python ./mnist-demo.py

Batch mode

...

Code Block
sbatch tf_sample.sb
squeue

Simple Example for Pytorch

Interactive mode

Get node for interactive use:

Code Block
srun --partition=debug --pty --nodes=1 --ntasks-per-node=8 --gres=gpu:v100:1 -t 01:30:00 --wait=0 --export=ALL /bin/bash

Once on the compute node, load PowerAI module using one of these:

Code Block
module load ibm/powerai/1.6.0.py2 # for python2 environment
module load ibm/powerai/1.6.0.py3 # for python3 environment
module load ibm/powerai           # python3 environment by default

Install samples for Pytorch:

Code Block
pytorch-install-samples ~/pytorch-samples
cd ~/pytorch-samples

Train on MNIST with Pytorch:

Code Block
python ./examples/mnist/main.py

Batch mode

The same can be accomplished in batch mode using the following pytorch_sample.sb script:

Code Block
sbatch pytorch_sample.sb
squeue