helpers.py 文件源码

python
阅读 52 收藏 0 点赞 0 评论 0

项目:2048-RL-DRQN 作者: Mostafa-Samir 项目源码 文件源码
def Unroll(axis, num=None):
    """
    defines an _OperationalLayer that unpacks a tensor along a given axis

    Parameters:
    ----------
    axis: int
    num: int
        the numeber if tensors to unpack form the gievn tensor
    Returns: _OperationalLayer
    """

    def unroll_op(obj, X):
        return tf.unpack(X, obj.params[0], 1)

    return _OperationalLayer(unroll_op, [num, axis])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号