【pytorch踩坑记录】NameError: name ‘opt’ is not defined

学习陈云老师的《深度学习框架PyTorch:入门与实践 》猫狗二分类实战时遇到的问题。
运行环境:在这里插入图片描述
问题描述:

(pytorch) D:\SoftWares-Academic\python_workspace\pytorch-best-practice>python main.py help

    usage : python file.py <function> [--args=value]
    <function> := train | test | help
    example:
            python main.py train --env='env0701' --lr=0.01
            python main.py test --dataset='path/to/dataset/root/'
            python main.py help
    avaiable args:
Traceback (most recent call last):
  File "main.py", line 171, in <module>
    import fire
  File "D:\SoftWares-Academic\Anaconda3\envs\pytorch\lib\site-packages\fire\core.py", line 138, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "D:\SoftWares-Academic\Anaconda3\envs\pytorch\lib\
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值