提交 4785bfb6 编写于 作者: W wizardforcel

2020-12-10 11:18:46

上级 7dfc9581
......@@ -433,7 +433,7 @@ python object_detection/export_inference_graph.py \
Could not create TensorFlow Graph: Not found: Op type not registered 'NonMaxSuppressionV2'
```
除非将 TensorFlow 实验 Pod 更新为包括未在此处注册的 **op**,否则解决这些问题的唯一方法是通过从 TensorFlow 源构建自定义 TensorFlow iOS 库,这就是我们为什么向您展示第 1 章,“移动 TensorFlow 入门”中的内容,“如何从源代码获取和设置 TensorFlow”。 让我们看一下构建自己的 TensorFlow iOS 库并使用它来创建具有 TensorFlow 支持的新 iOS 应用的步骤。
除非将 TensorFlow 实验 Pod 更新为包括未在此处注册的**操作**,否则解决这些问题的唯一方法是通过从 TensorFlow 源构建自定义 TensorFlow iOS 库,这就是我们为什么向您展示第 1 章,“移动 TensorFlow 入门”中的内容,“如何从源代码获取和设置 TensorFlow”。 让我们看一下构建自己的 TensorFlow iOS 库并使用它来创建具有 TensorFlow 支持的新 iOS 应用的步骤。
......
......@@ -30,7 +30,7 @@ GAN 是学习生成类似于真实数据或训练集中数据的神经网络。
In the next section, you'll see a detailed code snippet that matches the given description of the generator and the discriminator networks and their training process. If you feel like understanding more about GANs, in addition to our summary overview here, you can search for *"Introduction to GANs"* on YouTube and watch Ian Goodfellow's introduction and tutorial videos on GAN at NIPS (Neural Information Processing Systems) Conference 2016 and ICCV (International Conference on Computer Vision) 2017\. In fact, there are 7 NIPS 2016 Workshop on Adversarial Training videos and 12 ICCV 2017 GAN Tutorial videos on YouTube that you can immerse yourself in.
在生成者和区分者两个参与者的竞争目标下,GAN 是一个寻求两个对手之间保持平衡的系统。 如果两个玩家都具有无限的能力并且可以进行最佳训练,那么纳什均衡(继 1994 年诺贝尔经济学奖得主约翰·纳什和电影主题 *A Beautiful Mind* 之后) 一种状态,在这种状态下,任何玩家都无法通过仅更改其自己的策略来获利,这对应于生成器生成数据的状态,该数据看起来像真实数据,而判别器无法从假数据中分辨真实数据。
在生成者和区分者两个参与者的竞争目标下,GAN 是一个寻求两个对手之间保持平衡的系统。 如果两个玩家都具有无限的能力并且可以进行最佳训练,那么纳什均衡(继 1994 年诺贝尔经济学奖得主约翰·纳什和电影主题《美丽心灵》之后) 一种状态,在这种状态下,任何玩家都无法通过仅更改其自己的策略来获利,这对应于生成器生成数据的状态,该数据看起来像真实数据,而判别器无法从假数据中分辨真实数据。
If you're interested in knowing more about the Nash Equilibrium, Google *"khan academy nash equilibrium"* and watch the two fun videos on it by Sal Khan. The Wikipedia page on Nash Equilibrium and the article, *"**What is the Nash equilibrium and why does it matter?"* in The Economist explaining economics ([https://www.economist.com/blogs/economist-explains/2016/09/economist-explains-economics](https://www.economist.com/blogs/economist-explains/2016/09/economist-explains-economics)) are also a good read. Understanding the basic intuition and idea behind GANs will help you appreciate more why it has great potential.
......
......@@ -866,7 +866,7 @@ def normalized_discounted_rewards(rewards):
return (dr - dr.mean()) / dr.std()
```
例如,如果`discount_rate`为 0.95,则奖励列表[1,1,1]中第一个动作的折扣奖励为`1 + 1 * 0.95 + 1 * 0.95 ** 2 = 2.8525`,并且折扣奖励 第二和最后一个元素是 1.95 和 1; 奖励列表`[1,1,1,1,1]`中第一个动作的折扣奖励为`1 + 1 * 0.95 + 1 * 0.95 ** 2 + 1 * 0.95 ** 3 + 1 * 0.95 ** 4 = 4.5244`,其余动作为 3.7099、2.8525、1.95 和 1 。` [1,1,1]``[1,1,1,1,1]`的归一化折扣奖励为`[1.2141, 0.0209, -1.2350]``[1.3777, 0.7242, 0.0362, -0.6879, -1.4502]`。 每个规范化的折扣清单按降序排列,这意味着动作持续的时间越长(在情节结束之前),其奖励就越大。
例如,如果`discount_rate`为 0.95,则奖励列表`[1,1,1]`中第一个动作的折扣奖励为`1 + 1 * 0.95 + 1 * 0.95 ** 2 = 2.8525`,并且折扣奖励 第二和最后一个元素是 1.95 和 1; 奖励列表`[1,1,1,1,1]`中第一个动作的折扣奖励为`1 + 1 * 0.95 + 1 * 0.95 ** 2 + 1 * 0.95 ** 3 + 1 * 0.95 ** 4 = 4.5244`,其余动作为 3.7099、2.8525、1.95 和 1 。` [1,1,1]``[1,1,1,1,1]`的归一化折扣奖励为`[1.2141, 0.0209, -1.2350]``[1.3777, 0.7242, 0.0362, -0.6879, -1.4502]`。 每个规范化的折扣清单按降序排列,这意味着动作持续的时间越长(在情节结束之前),其奖励就越大。
接下来,创建 CartPole 体育馆环境,定义`learning_rate``discount_rate`超参数,并像以前一样使用四个输入神经元,四个隐藏神经元和一个输出神经元构建网络:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册