Class: Transformers::DebertaV2::DebertaV2OnlyMLMHead

Inherits:
Torch::NN::Module
  • Object
show all
Defined in:
lib/transformers/models/deberta_v2/modeling_deberta_v2.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ DebertaV2OnlyMLMHead

Returns a new instance of DebertaV2OnlyMLMHead.



918
919
920
921
# File 'lib/transformers/models/deberta_v2/modeling_deberta_v2.rb', line 918

def initialize(config)
  super()
  @predictions = DebertaV2LMPredictionHead.new(config)
end

Instance Method Details

#forward(sequence_output) ⇒ Object



923
924
925
926
# File 'lib/transformers/models/deberta_v2/modeling_deberta_v2.rb', line 923

def forward(sequence_output)
  prediction_scores = @predictions.(sequence_output)
  prediction_scores
end