^ _ ^
Gradient Clip
1 | '''To avoid graidient exploration |
TransformerEncoderLayer
1 | '''torch.nn.TransformerEncoderLayer |
torch.expand
1 | torch.arange(5).expand(3, 5) |
index_fill
1 | '''pytorch -- index_fill |
torch.multinomial
1 | '''torch.multinomial |
torch.div
1 | '''Divide each element of `input` with the scale `other` |
torch.bmm
1 | '''batch matrix multiplication |
torch.clamp
1 | '''Limit every item in the input in the limited range |
view
1 | '''view |