由于Keras包装器还不支持注意力模型,我想引用下面的定制注意。在
https://github.com/datalogue/keras-attention/blob/master/models/custom_recurrents.py
但问题是,当我运行上面的代码时,它返回以下错误:
ImportError: cannot import name '_time_distributed_dense'
2.0.0以上的keras似乎不再支持“时间”分布的“密集”了
唯一使用_time_distributed_dense module的部分是以下部分:
^{pr2}$我应该用哪种方式改变“时间”的分布密度(自我…)部分?在
我刚从An Chen's answer of the GitHub issue发帖(该页或他的答案将来可能会被删除)
您只需在Python代码中添加这个。在
相关问题 更多 >
编程相关推荐