命令行運行Python腳本時傳入參數的三種方式

三種經常使用的方式 若是在運行python腳本時須要傳入一些參數,例如gpus與batch_size,可使用以下三種方式。html python script.py 0,1,2 10 python script.py -gpus=0,1,2 --batch-size=10 python script.py -gpus=0,1,2 --batch_size=10 這三種格式對應不一樣的參數解析方式,
相關文章
相關標籤/搜索