Method: Transformers::BatchFeature#initialize

Defined in:
lib/transformers/feature_extraction_utils.rb

#initialize(data:, tensor_type:) ⇒ BatchFeature

Returns a new instance of BatchFeature.



17
18
19
20
# File 'lib/transformers/feature_extraction_utils.rb', line 17

def initialize(data:, tensor_type:)
  @data = data
  convert_to_tensors(tensor_type: tensor_type)
end