base_controller.py 文件源码

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

项目:EAS 作者: han-cai 项目源码 文件源码
def build_cell(units, cell_type='lstm', num_layers=1):
    if num_layers > 1:
        cell = rnn.MultiRNNCell([
            build_cell(units, cell_type, 1) for _ in range(num_layers)
        ])
    else:
        if cell_type == "lstm":
            cell = rnn.LSTMCell(units)
        elif cell_type == "gru":
            cell = rnn.GRUCell(units)
        else:
            raise ValueError('Do not support %s' % cell_type)
    return cell
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号