程序问答   发布时间:2022-06-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了FileNotFoundError: [Errno 2] 没有这样的文件或目录:hparams.json大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决FileNotFoundError: [Errno 2] 没有这样的文件或目录:hparams.json?

开发过程中遇到FileNotFoundError: [Errno 2] 没有这样的文件或目录:hparams.json的问题如何解决?下面主要结合日常开发的经验,给出你关于FileNotFoundError: [Errno 2] 没有这样的文件或目录:hparams.json的解决方法建议,希望对你解决FileNotFoundError: [Errno 2] 没有这样的文件或目录:hparams.json有所启发或帮助;

我尝试为 https://github.com/jrwnter/cddd 中的连续和数据驱动描述符 (CDDD) 实现模型。

我克隆了 cddd.git 并尝试使用提供的 yml 文件创建 conda 环境,但未能获得多个依赖项“错误”。因此,我使用 conda pacakging 管理器创建了一个具有所列先决条件的新 conda 环境。

然后我安装了 cddd 包并下载了预训练模型,如 README 文件中所述。

模型的“测试”成功了,但是当我尝试运行主模型时,我收到了几个警告和一个“fileNotFoundError(请参见下文)。我试图在不同的目录中运行脚本......

>

如果有人能帮助我就好了。如果缺少某些信息,请告诉我。

非常感谢

(cddd) [....@localhost default_model]$ cddd --input ../example/ames.csv --output ../example/ames_descriptors.csv  --smiles_header smiles
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type,1) or '1type' as a synonym of type is deprecated; in a future version of numpy,it will be understood as (type,(1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8",np.int8,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type,)type'.
  _np_quint8 = np.dtype([("quint8",np.uint8,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type,)type'.
  _np_qint16 = np.dtype([("qint16",np.int16,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type,)type'.
  _np_quint16 = np.dtype([("quint16",np.uint16,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type,)type'.
  _np_qint32 = np.dtype([("qint32",np.int32,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type,)type'.
  np_resource = np.dtype([("resource",np.ubyte,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type,1)])
/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type,1)])
WARNING:tensorflow:From /home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/cddd/run_cddd.py:99: The name tf.app.run is deprecated. Please use tf.compat.v1.app.run instead.

start preprocessing SMILEs...
finished preprocessing SMILES!
start calculaTing descriptors...
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information,please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not Listed there,please file an issue.

W0201 17:27:24.857788 139656752092992 lazy_loader.py:50] 
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information,please file an issue.

TraceBACk (most recent call last):
  file "/home/..../miniconda3/envs/cddd/bin/cddd",line 8,in <module>
    sys.exit(main_wrapper())
  file "/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/cddd/run_cddd.py",line 99,in main_wrapper
    tf.app.run(main=main,argv=[sys.argv[0]] + UNPARSED)
  file "/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/tensorflow/python/platform/app.py",line 40,in run
    _run(main=main,argv=argv,flags_parser=_parse_flags_tolerate_undef)
  file "/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/absl/app.py",line 303,in run
    _run_main(main,args)
  file "/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/absl/app.py",line 251,in _run_main
    sys.exit(main(argv))
  file "/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/cddd/run_cddd.py",line 79,in main
    cpu_threads=FLAGs.cpu_threads)
  file "/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/cddd/inference.py",line 102,in __init__
    self.hparams = create_hparams(flags)
  file "/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/cddd/hyperparameters.py",line 119,in create_hparams
    hparams = hparams.parse_Json(Json.load(open(hparams_file_name)))
fileNotFoundError: [Errno 2] No such file or directory: '/home/..../miniconda3/envs/cddd/lib/python3.7/site-packages/cddd/data/default_model/hparams.Json'

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的FileNotFoundError: [Errno 2] 没有这样的文件或目录:hparams.json全部内容,希望文章能够帮你解决FileNotFoundError: [Errno 2] 没有这样的文件或目录:hparams.json所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。