Class: Cohere::Transcribe::PyTorchCheckpoint::Tensor
- Inherits:
-
Data
- Object
- Data
- Cohere::Transcribe::PyTorchCheckpoint::Tensor
- Defined in:
- lib/cohere/transcribe/pytorch_checkpoint.rb
Instance Attribute Summary collapse
-
#data_start ⇒ Object
readonly
Returns the value of attribute data_start.
-
#dtype ⇒ Object
readonly
Returns the value of attribute dtype.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#nbytes ⇒ Object
readonly
Returns the value of attribute nbytes.
-
#reader ⇒ Object
readonly
Returns the value of attribute reader.
-
#shape ⇒ Object
readonly
Returns the value of attribute shape.
-
#storage_data_start ⇒ Object
readonly
Returns the value of attribute storage_data_start.
-
#storage_elements ⇒ Object
readonly
Returns the value of attribute storage_elements.
-
#storage_key ⇒ Object
readonly
Returns the value of attribute storage_key.
-
#storage_offset ⇒ Object
readonly
Returns the value of attribute storage_offset.
-
#stride ⇒ Object
readonly
Returns the value of attribute stride.
Instance Method Summary collapse
Instance Attribute Details
#data_start ⇒ Object (readonly)
Returns the value of attribute data_start
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def data_start @data_start end |
#dtype ⇒ Object (readonly)
Returns the value of attribute dtype
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def dtype @dtype end |
#name ⇒ Object (readonly)
Returns the value of attribute name
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def name @name end |
#nbytes ⇒ Object (readonly)
Returns the value of attribute nbytes
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def nbytes @nbytes end |
#reader ⇒ Object (readonly)
Returns the value of attribute reader
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def reader @reader end |
#shape ⇒ Object (readonly)
Returns the value of attribute shape
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def shape @shape end |
#storage_data_start ⇒ Object (readonly)
Returns the value of attribute storage_data_start
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def storage_data_start @storage_data_start end |
#storage_elements ⇒ Object (readonly)
Returns the value of attribute storage_elements
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def storage_elements @storage_elements end |
#storage_key ⇒ Object (readonly)
Returns the value of attribute storage_key
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def storage_key @storage_key end |
#storage_offset ⇒ Object (readonly)
Returns the value of attribute storage_offset
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def storage_offset @storage_offset end |
#stride ⇒ Object (readonly)
Returns the value of attribute stride
49 50 51 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 49 def stride @stride end |
Instance Method Details
#element_count ⇒ Object
53 54 55 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 53 def element_count shape.empty? ? 1 : shape.reduce(1, :*) end |
#floating_point? ⇒ Boolean
57 58 59 |
# File 'lib/cohere/transcribe/pytorch_checkpoint.rb', line 57 def floating_point? FLOAT_DTYPES.include?(dtype) end |