Caffe2
Caffe2 is a lightweight, modular, and scalable deep learning framework. Building on the original Caffe, Caffe2 is designed with expression, speed, and modularity in mind.
Slurm Script
#!/bin/bash
#SBATCH -J pyCaffe2_codejob # Job name
#SBATCH -o pyCafe2_output.%j.out # Name of stdout output file (%j expands to jobId)
#SBATCH -p CUIQue # Queue name
#SBATCH -N 1 # Total number of nodes requested
#SBATCH -n 16 # Total number of mpi tasks requested
module load python/3.8.12 py-torch/1.11.0 py-numpy/1.22.4
python3.8 myexample.py
myexample.c Code
from caffe2.python import workspace, model_helper import numpy as np # Create random tensor of three dimensions x = np.random.rand(4, 3, 2) print(x) print(x.shape) workspace.FeedBlob("my_x", x) x2 = workspace.FetchBlob("my_x") print(x2)
Submit the job to the scheduler as
sbatch mycaffe2.slurm
For managing your “job” , refer to this guide.
For more on caffe2 framework, refer to their official documentation
https://caffe2.ai/docs/intro-tutorial