sgnlp
Quickstart
Advanced Tutorial
API Reference
models
csgec
emotion_entailment
lsr
rst_pointer
rumour_detection_twitter
config
modeling
modules
tokenization
train
utils
sentic_gcn
span_extraction
ufd
utils
sgnlp
»
sgnlp
»
models
»
rumour_detection_twitter
»
modules
»
transformer
»
transformer
»
Transformer
View page source
Transformer
¶
class
Transformer
(
config
,
n_layers
,
d_model
,
n_heads
)
[source]
¶
forward
(
query
,
key
,
val
,
key_structure
=
None
,
val_structure
=
None
,
attention_mask
=
None
)
[source]
¶
This function takes in a sequence and apply MHA to it