Deployed f8db199 with MkDocs version: 1.3.1

This commit is contained in:
2022-07-29 11:07:11 +00:00
parent 8a093ac9d2
commit d430336c47
11 changed files with 741 additions and 722 deletions

View file

@ -182,9 +182,8 @@
" positive_likelihood = torch.nn.Softmax(dim=1)(result.logits)[0][1]\n",
" tokens = tensors[\"input_ids\"][0]\n",
"\n",
" attentions = np.sum(result.attentions[-1].numpy()[0], axis=0)[0][\n",
" 1:-1\n",
" ] # Tuple of `torch.FloatTensor` (one for each layer) of shape\n",
" attentions = np.sum(result.attentions[-1].numpy()[0], axis=0)[0][1:-1]\n",
" # Tuple of `torch.FloatTensor` (one for each layer) of shape\n",
" # `(batch_size, num_heads, sequence_length, sequence_length)`.\n",
"\n",
" explanation = []\n",