graykode / graykode/nlp-tutorial

BiLstm(tf) maybe have mistake

Đang mở
#74 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
14.9k
Fork
3.9k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

calculate attention_score
`
# Attention
outputs = tf.concat([output[0], output[1]], 2) # output[0] : lstm_fw, output[1] : lstm_bw
outputs = tf.transpose(outputs, [1, 0, 2]) # [n_step, batch_size, n_hidden]
# 只用了最后一个步长的输出
final_hidden_state = outputs[-1]
output_all = tf.concat([output[0], output[1]], 2)
final_hidden_state = tf.expand_dims(final_hidden_state, 2)
attn_weights = tf.squeeze(tf.matmul(output_all, final_hidden_state), 2) `

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by locating the BiLstm(tf) implementation and reviewing the shown attention-score calculation, especially the final hidden state and tensor dimensions. Verify whether the resulting attention weights match the intended bidirectional LSTM attention behavior; done means resolving and correcting the suspected mistake, if confirmed.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
tensorflow
Lĩnh vực
machine-learning
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
20/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.