学会使用强化学习框架Acme(5)

建议简单看下

学会使用强化学习框架Acme(4)_wo_squirrel的博客-CSDN博客建议先简单看下学会使用强化学习框架(1)(2)(3)还是同一个代码块,但是出现了不同的错误:代码:import IPythonfrom acme import environment_loopfrom acme import specsfrom acme import wrappersfrom acme.agents.tf import d4pgfrom acme.tf import networksfrom acme.tf import utils as tf2_utilsfhttps://blog.csdn.net/wo_squirrel/article/details/124645630?spm=1001.2014.3001.5502 

继续在jupyter notebook上运行quickstart

在这里Import Modules出现了这个警告(这个Import Modules已经出现3,4个错误了)

/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/flatbuffers/compat.py:19: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/keras_preprocessing/image/utils.py:23: DeprecationWarning: NEAREST is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.NEAREST or Dither.NONE instead.
  'nearest': pil_image.NEAREST,
/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/keras_preprocessing/image/utils.py:24: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead.
  'bilinear': pil_image.BILINEAR,
/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/keras_preprocessing/image/utils.py:25: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
  'bicubic': pil_image.BICUBIC,
/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/keras_preprocessing/image/utils.py:28: DeprecationWarning: HAMMING is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.HAMMING instead.
  if hasattr(pil_image, 'HAMMING'):
/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/keras_preprocessing/image/utils.py:30: DeprecationWarning: BOX is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BOX instead.
  if hasattr(pil_image, 'BOX'):
/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/keras_preprocessing/image/utils.py:33: DeprecationWarning: LANCZOS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
  if hasattr(pil_image, 'LANCZOS'):
/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/reverb/platform/default/ensure_tf_install.py:53: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if (distutils.version.LooseVersion(version) <
/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/sonnet/src/types.py:34: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  BoolLike = Union[bool, np.bool, TensorLike]
/home/jw/anaconda3/envs/acme/lib/python3.9/site-packages/tensorflow_probability/python/__init__.py:57: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if (distutils.version.LooseVersion(tf.__version__) <

第一个是弃用警告DeprecationWarning

该类型的警告大多属于版本更新时,所使用的方法过时的原因,可以在该方法的说明处查找替换的方法。

一般来说,开发人员正在开发库,有时在开发中添加或更改内容,有时删除主题。删除是危险的,因为用户可能会使用它,如果开发人员要删除一个东西,首先必须通知其他人不要使用这个功能或东西,然后他可以删除。而DeprecationWarning就是这个通知。

忽略这个警告。

继续往下运行。

出现错误,让安装一个包。

pip install imageio-ffmpeg

安装之后成功运行。视频如下:

DRL框架Acme的教学quickstart运行结果

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值