TypeError: makedirs() got an unexpected keyword argument 'exist_ok'

网友投稿 312 2022-08-26

TypeError: makedirs() got an unexpected keyword argument 'exist_ok'

今天我跑了一个别人的深度学习模型,发现了一个奇怪的问题,查了一下原来makedirs()在python 2.x和python3.x有点区别,又是版本问题,遇见错误了,那么我就把它记录下来。

totalMemory: 1.95GiB freeMemory: 1.64GiB2018-04-18 14:41:49.042748: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 760, pci bus id: 0000:01:00.0, compute capability: 3.0)Traceback (most recent call last): File "deepFM.py", line 429, in run() File "deepFM.py", line 425, in run single_run(feature_cnt, field_cnt, params) File "deepFM.py", line 183, in single_run os.makedirs(model_path, exist_ok=True)TypeError: makedirs() got an unexpected keyword argument 'exist_ok'

把python2换成python3就完了。

python3 deepFM.py

参考文献

[1].makedirs() got an unexpected keyword argument 'exist_ok.

​​https://github.com/bamos/dcgan-completion.tensorflow/issues/20 ​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:营销真的是妙可蓝多的核心竞争力吗?
下一篇:[leetcode] 1155. Number of Dice Rolls With Target Sum
相关文章

 发表评论

暂时没有评论,来抢沙发吧~