问题标签 [openai]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
285 浏览

python - Matplotlib 绘制比例三角形

我的三角形图出现不平衡,我如何使它成比例?

0 投票
1 回答
134 浏览

tensorflow - 理解openAI 5的模型(1024单元LSTM强化学习)

我最近遇到了 openAI 5。我很好奇他们的模型是如何构建和理解的。我在维基百科中读到它“包含一个带有 1024 单元 LSTM 的单层”。然后我发现这个包含架构方案的pdf。

我的问题

从这一切我不明白一些事情:

  1. 拥有 1024 个单元的 LSTM 层意味着什么?这是否意味着我们有 1024 个时间步长和单个 LSTM 单元,或者这是否意味着我们有 1024 个单元。你能给我看一些可视化的图表吗?我特别难以在一层中可视化 1024 个单元格。(我尝试查看几个 SO 问题,例如12openAI 5 博客,但它们并没有太大帮助)。

  2. 你如何在这样的模型上进行强化学习?我习惯了 RL 与 Q-Tables 一起使用,并且它们在训练期间被更新。这是否仅仅意味着他们的损失函数就是奖励?

  3. 为什么这么大的模型没有梯度消失之类的问题?在pdf中没有看到任何类型的规范化。

  4. 在 pdf 中,您可以看到一个蓝色矩形,似乎它是一个单元,并且其中有N一个。这是什么意思?如果我弄错了,请纠正我,粉红色的框用于选择最佳移动/项目(?)


总的来说,所有这些都可以概括为“openAI 5 模型是如何工作的?

0 投票
1 回答
99 浏览

python-3.x - Nix openai python开发环境构建失败

我正在尝试openai使用 nix 制作一个包含 pypi 包的 python37 开发环境。

这个问题最初是在 reddit 上,但我找不到答案,而且线程中的活动非常低。

使用我到达那里的提示和语言框架文档,我设法提出了以下表达式:

默认.nix:

发布.nix

然而,这给我留下了(我猜它的点子)错误

这让我感到惊讶,因为propagateBuildInputs = [ pkgs.python37Packages.requests ];明确指出包requests(nixpkgs 中的版本 2.22.0)应该在构建时存在。

我对buildPythonPackage阻止它工作的功能有什么误解?

0 投票
1 回答
306 浏览

machine-learning - 是否可以在训练之前和训练期间修改 OpenAI 健身房状态?

我想做的是修改环境,例如以超级马里奥兄弟健身房环境为例,模糊代理训练的图像,看看强化学习代理是否仍然能够在这些“模糊”状态下学习。

OpenAI 是否可以做这样的事情?我将如何添加健身房环境预处理步骤?

0 投票
0 回答
110 浏览

openai - FileNotFoundError: [WinError 2] 系统找不到指定的文件 (Openai-universe)

我正在尝试安装 Universe,但每次我都pip install universe收到此错误[WinError 2]The system cannot find the file specified,这不是完整错误,完整错误如下所示:

在提到这些话之后,我得到:

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

0 投票
2 回答
4412 浏览

python - ImportError:找不到框架/System/Library/Frameworks/OpenGL.framework

我正在尝试在新的macOs Big Sur上运行这个简单的健身房示例。

但是,我遇到了这个

我关注了这个这个讨论,但找不到一个可行的解决方案。有人可以帮忙吗?


附加信息

  • macOS 大苏尔 11.0.1
  • Python 3.9.0
  • PyOpenGL==3.1.5
  • pyglet==1.5.11 (运行后pip install pyglet==1.5.11显示Requirement already satisfied: pyglet==1.5.11 in /Library/Frameworks/...,但是,print(pyglet.version)在我的脚本中运行时,我得到了1.5.0)。1.5.11即使它已经安装,我如何才能将其更改为?
0 投票
2 回答
1126 浏览

api - InvalidRequestError:在调用 openAI API 以生成文本时必须提供“引擎”参数

我正在尝试 OpenAI 中给出的这段代码。

链接:-文本生成 API

代码

我收到一个错误

错误

"必须提供一个 'engine' 参数来创建一个 %s" % cls, "engine"。openai.error.InvalidRequestError:必须提供“引擎”参数才能创建 <class 'openai.api_resources.completion.Completion'>

我正在使用 python 3.7.6

0 投票
1 回答
391 浏览

python - 如何从 GYM 制作用户可以使用键盘玩的手推车游戏

我从 open ai GYM 了解了推车杆,我想知道是否可以制作一个用户可以控制杆的游戏。我试图将用户击键值作为输入并将其付诸实践,但环境只是冻结了。有什么办法可以减慢游戏速度并让用户输入来控制?我将用户输入作为

但这似乎是错误的方式。

0 投票
1 回答
100 浏览

python - 使用烧瓶和 html/react 打开 AI Gym cartpole 渲染

我正在尝试创建一个网站,在后端(在烧瓶中)我保留 open ai gym 代码并将其呈现在前端 html 文件中。我对打开 ai 健身房还很陌生,我不确定如何在前面的 html 上呈现它。互联网上的资源似乎很少。

0 投票
1 回答
605 浏览

python - ValueError: Input 0 of layer dense is incompatible with the layer: expected axis -1 to have value 8 but received input with shape [None, 1]

I'm training a model for the OpenAI lunarLander-v2 environment. I've succesfully done this using a Sequential model, but when trying to use the functional model, I get some errors with tensorshapes being incompatible. Here is the code for the Agent class, the issue I think has to do with the shape of the done_list and next_states being incompatible, but I'm not sure how to reshape these tensors for it to work.

Similar code works fine when creating the model using the Sequential API instead of the functional. I'm very new to this, and to SO as well, any help is greatly appreciated.

WARNING:tensorflow:Model was constructed with shape (None, 8) for input Tensor("input_10:0", shape=(None, 8), dtype=float32), but it was called on an input with incompatible shape (None, 1). ValueError: Input 0 of layer dense_72 is incompatible with the layer: expected axis -1 of input shape to have value 8 but received input with shape [None, 1]

The model from the sequential implementation, which runs with no issues (the rest of the code is the same)