diff --git a/research/mi_lira_2021/README.md b/research/mi_lira_2021/README.md index 72cd48f..ae68154 100644 --- a/research/mi_lira_2021/README.md +++ b/research/mi_lira_2021/README.md @@ -8,14 +8,15 @@ by Nicholas Carlini, Steve Chien, Milad Nasr, Shuang Song, Andreas Terzis, and F ### INSTALLING -You will need to install fairly standard dependencies +You will need to install fairly standard dependencies and python 3.11 minimum. -`pip install scipy, sklearn, numpy, matplotlib` - -and also some machine learning framework to train models. We train our models -with JAX + ObJAX so you will need to follow build instructions for that -https://github.com/google/objax -https://objax.readthedocs.io/en/latest/installation_setup.html +``` +pip install scipy scikit-learn numpy matplotlib tensorflow tensorflow_datasets objax +RELEASE_URL="https://storage.googleapis.com/jax-releases/jax_cuda_releases.html" +JAX_VERSION=`python3 -c 'import jax; print(jax.__version__)'` +pip uninstall -y jaxlib +pip install -f $RELEASE_URL jax[cuda]==$JAX_VERSION +``` ### RUNNING THE CODE diff --git a/research/mi_lira_2021/scripts/train_demo.sh b/research/mi_lira_2021/scripts/train_demo.sh index 20e5e91..3732a1e 100644 --- a/research/mi_lira_2021/scripts/train_demo.sh +++ b/research/mi_lira_2021/scripts/train_demo.sh @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -mkdir logs +mkdir -p logs SECONDS=0 diff --git a/research/mi_lira_2021/scripts/train_demo_multigpu.sh b/research/mi_lira_2021/scripts/train_demo_multigpu.sh index f20334b..1fbd86c 100644 --- a/research/mi_lira_2021/scripts/train_demo_multigpu.sh +++ b/research/mi_lira_2021/scripts/train_demo_multigpu.sh @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +mkdir -p logs CUDA_VISIBLE_DEVICES='0' python3 -u train.py --dataset=cifar10 --epochs=100 --save_steps=20 --arch wrn28-2 --num_experiments 16 --expid 0 --logdir exp/cifar10 &> logs/log_0 & CUDA_VISIBLE_DEVICES='1' python3 -u train.py --dataset=cifar10 --epochs=100 --save_steps=20 --arch wrn28-2 --num_experiments 16 --expid 1 --logdir exp/cifar10 &> logs/log_1 &