Value passed to parameter 'begin' has DataType float32 not in list of allowed values: int32, int64报错 文件在array_ops.py

如题 报错文件在array_ops.py

源码为

    def loss_jeq(self, Q_select):
        jeq = 0.0
        for i in range(self.batch_size):
            ae = self.actiond[i]
            max_value = float("-inf")
            for a in range(self.n_actions):
                max_value = tf.maximum(Q_select[i][a] + self.loss_l(ae, a), max_value)
            q_value = Q_select[i][ae]#此处报错
            jeq += (max_value - q_value)
        return jeq

报错为

Traceback (most recent call last):
  File "J:/C51/PYCHARMmm/transfer-learning/2.10/训练好的/VGT-dueling_1098s_zl _xxx_0.1/VGT-dueling_45s_zl _xxx/VGT_DQN_1098_0.1S.py", line 282, in <module>
    e_greedy_increment=INCREMENT, dueling=True, output_graph=True)
  File "J:/C51/PYCHARMmm/transfer-learning/2.10/训练好的/VGT-dueling_1098s_zl _xxx_0.1/VGT-dueling_45s_zl _xxx/VGT_DQN_1098_0.1S.py", line 47, in __init__
    self._build_net()
  File "J:/C51/PYCHARMmm/transfer-learning/2.10/训练好的/VGT-dueling_1098s_zl _xxx_0.1/VGT-dueling_45s_zl _xxx/VGT_DQN_1098_0.1S.py", line 127, in _build_net
    + 1.0 * self.loss_jeq(self.q_eval)\
  File "J:/C51/PYCHARMmm/transfer-learning/2.10/训练好的/VGT-dueling_1098s_zl _xxx_0.1/VGT-dueling_45s_zl _xxx/VGT_DQN_1098_0.1S.py", line 78, in loss_jeq
    q_value = Q_select[i][ae]
  File "H:\Anaconda3\envs\rl\lib\site-packages\tensorflow\python\ops\array_ops.py", line 525, in _slice_helper
    name=name)
  File "H:\Anaconda3\envs\rl\lib\site-packages\tensorflow\python\ops\array_ops.py", line 691, in strided_slice
    shrink_axis_mask=shrink_axis_mask)
  File "H:\Anaconda3\envs\rl\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 8521, in strided_slice
    name=name)
  File "H:\Anaconda3\envs\rl\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 609, in _apply_op_helper
    param_name=input_name)
  File "H:\Anaconda3\envs\rl\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 60, in _SatisfiesTypeConstraint
    ", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: Value passed to parameter 'begin' has DataType float32 not in list of allowed values: int32, int64

望各位解答!