使用Latex对公式进行标号并对齐

时间:2022-03-31 06:46:40

在公式后面空一格并添加 \tag{number}

(1) a i , t = e x p ( h t T W b b i ) j e x p ( h t T W b b j )

(2) c t = i = 1 , , | x | a i , t b i

$$ a_{i,t} = \frac{exp(h_t^TW_bb_i)}{\sum_jexp(h_t^TW_bb_j)} \tag{1}$$
$$c_t = \sum_{i=1,…,|x|}a_{i,t}b_i \tag{2}$$