AttributeError:无法在python3中设置属性

时间:2019-06-21 03:22:03

标签: python python-3.x keras

要在Google合作实验室上运行:

  params.dropoutkeepprobs = DropoutKeepProbs(
        self.q_conv_keep_prob,
        self.q_dense_keep_prob,
        self.q_gru_keep_prob
    )
    self.q = DeepSense(params, self.logger, self.sess, self.config, name=Q_NETWORK)

完整程序:https://github.com/samre12/deep-trading-agent/blob/master/code/model/agent.py

我试图在Google colab上的python 3中运行https://github.com/samre12/deep-trading-agent,出现此错误。 在python2上运行就可以了

 self._price_blocks.append(normalized_block.as_matrix())

AttributeError                            
Traceback (most recent call last)
<ipython-input-4-073c647caacb> in <module>()
     32 
     33 
---> 34 main('/content/gdrive/My Drive/stock markets/deep-trading-agent-master/code/config/config.cfg')

2 frames
/content/gdrive/My Drive/stock markets/deep-trading-agent-master/code/model/agent.py in build_dqn(self, params)

        232                     self.q_conv_keep_prob,
        233                     self.q_dense_keep_prob,
    --> 234                     self.q_gru_keep_prob
        235                 )
    236         self.q = DeepSense(params, self.logger, self.sess, self.config, name=Q_NETWORK)

AttributeError: can't set attribute

0 个答案:

没有答案