SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient

https://arxiv.org/abs/1609.05473

As a new way of training generative models, Generative Adversarial Nets (GAN) that uses a discriminative model to guide the training of the generative model has enjoyed considerable success in generating real-valued data. However, it has limitations when the goal is for generating sequences of discrete tokens. A major reason lies in that the discrete outputs from the generative model make it difficult to pass the gradient update from the discriminative model to the generative model. Also, the discriminative model can only assess a complete sequence, while for a partially generated sequence, it is non-trivial to balance its current score and the future one once the entire sequence has been generated. In this paper, we propose a sequence generation framework, called SeqGAN, to solve the problems. Modeling the data generator as a stochastic policy in reinforcement learning (RL), SeqGAN bypasses the generator differentiation problem by directly performing gradient policy update. The RL reward signal comes from the GAN discriminator judged on a complete sequence, and is passed back to the intermediate state-action steps using Monte Carlo search. Extensive experiments on synthetic data and real-world tasks demonstrate significant improvements over strong baselines.
Comments: The Thirty-First AAAI Conference on Artificial Intelligence (AAAI 2017)
Subjects: Learning (cs.LG); Artificial Intelligence (cs.AI)
Cite as: arXiv:1609.05473 [cs.LG]
  (or arXiv:1609.05473v5 [cs.LG] for this version)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ValueError: setting an array element with a sequence是一个常见的机器学习问题。这个错误通常出现在尝试将一个序列赋值给一个数组的元素时。根据引用、和的描述,这个问题可能与numpy数组的形状不匹配有关。 首先,需要检查代码中numpy数组的形状是否正确。如果数组的形状不正确,尝试重新调整数组的维度,以确保每个元素都具有相同的形状。 另外,还需要确认是否在使用数组的索引操作时出现了错误。在numpy中,使用索引操作时需要确保索引的维度和数组的形状是一致的。 如果仍然无法解决问题,可以尝试使用其他方法来解决该问题。例如,可以尝试使用循环来逐个赋值数组的元素,而不是直接赋值一个序列。 综上所述,当遇到ValueError: setting an array element with a sequence时,需要检查numpy数组的形状和索引操作,同时可以尝试使用其他方法来解决该问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [ValueError: setting an array element with a sequence.](https://blog.csdn.net/weixin_51197745/article/details/116591165)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [解决python-报错----ValueError: setting an array element with a sequence.](https://blog.csdn.net/qwerpoiu66/article/details/130902870)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值