【发布时间】:2021-06-17 21:44:28
【问题描述】:
当我使用 argparse 运行一些脚本时,找不到在 jupyter notebook 中为类似终端的命令传递值的方法:
!python train.py --img 512 --batch 8 --epochs 40
需要使用不同的时期数值迭代运行该脚本:10,40,70,100。喜欢:
!python train.py --img 512 --batch 8 --epochs 10
!python train.py --img 512 --batch 8 --epochs 40
!python train.py --img 512 --batch 8 --epochs 70
!python train.py --img 512 --batch 8 --epochs 100
【问题讨论】:
-
如果答案解决了您的问题,请记得接受并投票;)
标签: python-3.x jupyter-notebook argparse