1. pickle & pandas
AttributeError: Can't get attribute '_unpickle_block' on <module 'pandas._libs.internals' from '/rds/general/user/xy823/home/anaconda3/envs/test_DQN3_7/lib/python3.7/site-packages/pandas/_libs/internals.cpython-37m-x86_64-linux-gnu.so'>
解决:.pkl文件压缩的pandas和解压缩的pandas必须是同一个版本。
2. tf.reduce_mean
tf.math.reduce_mean(
input_tensor, axis=None, keepdims=False, name=None)
用于计算张量tensor沿着指定的数轴(tensor的某一维度)上的的平均值,主要用作降维或者计算tensor(图像)的平均值。
axis=0:按照列平均
axis=1:按照行平均
区分:tf.reduce_mean & np.mean
几乎等价,但 np.mean由dtype参数确定输出的数据类型(默认是float64),但
tf.reduce_mean 中输出参数的类型默认与input_tensor一致
3. Leaky ReLU 和 ReLU
Leaky ReLU Explained | Papers With Code
Leaky ReLU在负数部分有一个较小的斜率,目的是处理稀疏梯度的情况(sparse gradients),比如在训练生成对抗网络时
ReLU:
4. one-hot encoding独热编码
https://www.tensorflow.org/api_docs/python/tf/one_hot
Tensorflow 独热向量,tf.one_hot() 一看就明白的解释 - 知乎
machine learning - What is one hot encoding in tensorflow? - Data Science Stack Exchange
tf.one_hot(
indices,
depth,
on_value=None,
off_value=None,
axis=None,
dtype=None,
name=None
)
用于映射类别特征categorical feature成为类似二进制的编码
5. DQN, double DQN,Dueling DQN, Dueling Double DQN
5.1 DQN
target
5.2 double DQN
5.3 Dueling DQN
5.4 Dueling Double DQN
for trainning, use(2)
combine resultes,use(3)