Skip to content

Commit 472c340

Browse files
committed
Added remark on cpu in readme
1 parent 839133c commit 472c340

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ The results can be reproduced as follows :
4141
- Run the ```experiments.ipynb``` to produce the data
4242
- Run the ```analysis.ipynb``` to produce the plots used in the report
4343

44-
Please note that you need to create the folders ```./results``` and ```./results/weights``` if they
44+
Remarks :
45+
- You need to create the folders ```./results``` and ```./results/weights``` if they
4546
do not exist in your system.
47+
- The zero order optimization method can only be used on the CPU as it produced behaviors on different machines when using the GPU. If you still want to use the GPU, you can comment line 54 and decomment line 55 in ```main.py```.
4648

4749
## Authors
4850
- Kieran Vaudaux

main.py

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def main(use_default_config=True, config=None, deterministic=True, record_weight
5252

5353
# Use GPU if available
5454
device = ('cuda' if torch.cuda.is_available() and not config['zo_optim'] else 'cpu')
55+
#device = ('cuda' if torch.cuda.is_available() else 'cpu')
5556
if config['verbose']:
5657
print("Device used: ", device, '\n')
5758

0 commit comments

Comments
 (0)