Class: Cadenya::Types::ModelSpec_Capability_TopK
- Inherits:
-
Object
- Object
- Cadenya::Types::ModelSpec_Capability_TopK
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#top_k ⇒ Object
readonly
Returns the value of attribute top_k.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type: nil, top_k: nil) ⇒ ModelSpec_Capability_TopK
constructor
A new instance of ModelSpec_Capability_TopK.
- #to_h ⇒ Object
Constructor Details
#initialize(type: nil, top_k: nil) ⇒ ModelSpec_Capability_TopK
Returns a new instance of ModelSpec_Capability_TopK.
9417 9418 9419 9420 |
# File 'lib/cadenya/types.rb', line 9417 def initialize(type: nil, top_k: nil) @type = type @top_k = top_k end |
Instance Attribute Details
#top_k ⇒ Object (readonly)
Returns the value of attribute top_k.
9415 9416 9417 |
# File 'lib/cadenya/types.rb', line 9415 def top_k @top_k end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9415 9416 9417 |
# File 'lib/cadenya/types.rb', line 9415 def type @type end |
Class Method Details
.from_json(data) ⇒ Object
9422 9423 9424 9425 9426 9427 |
# File 'lib/cadenya/types.rb', line 9422 def self.from_json(data) new( type: data["type"], top_k: data["topK"].nil? ? nil : Types::Capability_TopK.from_json(data["topK"]), ) end |