Deep Biaffine Attention for Neural Dependency Parsing

arc得分

\begin{align} \label{tra-class}\mathbf{s}_i &= W\mathbf{r}_i + \mathbf{b} \end{align}

\begin{align} \label{arc-dep}\mathbf{h}_i^{(arc-dep)} &= \text{MLP}^{(arc-dep)}(\mathbf{r}_i)\\ \mathbf{h}_j^{(arc-head)} &= \text{MLP}^{(arc-head)}(\mathbf{r}_j) \end{align}

$$\label{arc-score}\mathbf{s}^{(arc)}_i = H^{(arc-head)}U^{(1)}\mathbf{h}^{(arc-dep)}_i+ H^{(arc-head)}\mathbf{u}^{(2)}$$

$$(d\times k) (k\times k)(k\times 1)+(d\times k)(k\times 1)=(d\times 1)$$

$$(d\times (k+1)) ((k+1)\times k)(k\times d)=(d\times d)$$

arc标签

\begin{align} \label{biaff-class}\mathbf{s}_i^{(label)} &= \mathbf{r}_{y_i}^\top \mathbf{U}^{(1)}\mathbf{r}_i + (\mathbf{r}_{y_i} \oplus \mathbf{r}_i)^\top U^{(2)} + \mathbf{b}\end{align}

$$\left( {\begin{array}{*{20}{c}} {\begin{array}{*{20}{c}} a \\ b \\ c \end{array}}&{\begin{array}{*{20}{c}} d \\ e \\ f \end{array}} \end{array}} \right)\left( {\begin{array}{*{20}{c}} {{x_1}} \\ {{x_2}} \end{array}} \right) = \left( {\begin{array}{*{20}{c}} {a{x_1} + d{x_2}} \\ {b{x_1} + e{x_2}} \\ {c{x_1} + f{x_2}} \end{array}} \right)$$

$$(1\times k)(m\times k \times k)(k\times 1)=(m\times 1 \times 1)$$

代码

# Linux
# export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl
# Mac
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.10.0-py2-none-any.whl
pip install --upgrade \$TF_BINARY_URL

评论 1

1. #1

请问环境如何配置的呢？为什么在win7 pycharm 下面，总是报 cannot import name ‘Configurable’ 的错误呢？我已经
执行了 pip install Configurable 还望博主尽快回复。非常感谢

听风雨1年前 (2018-10-15)回复