Skip to content

Commit

Permalink
readme: add example invokation
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-zhong committed May 9, 2019
1 parent 1b4b50a commit f27991a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,17 @@ visualizations, etc.
1. Use `parseArgsForClassOrScript(...)` to turn a python function into the head
for a cmdline script

For example, a script called `train.py` for the purpose of training models
would be able to then be invoked with the following command

`./train.py --dataset=mnist --num_epochs=50 --batch_size=128`

```python
#!/usr/bin/env python
import src.utils.utility as _util
import src.utils.cmd_line as _cmd

def train(dataset: str, num_epochs: int, ...):
def train(dataset: str, num_epochs: int, batch_size=16, ...):
...
for epoch in range(num_epochs):
train_step(...)
Expand Down

0 comments on commit f27991a

Please sign in to comment.