Class: Tensorflow::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/tensorflow/status.rb

Overview

Status holds error information returned by TensorFlow. We can use status to get error and even display the error messages from tensorflow.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStatus

Returns a new instance of Status.



5
6
7
# File 'lib/tensorflow/status.rb', line 5

def initialize
    self.c = Tensorflow::TF_NewStatus()
end

Instance Attribute Details

#cObject

Returns the value of attribute c.



4
5
6
# File 'lib/tensorflow/status.rb', line 4

def c
  @c
end

Instance Method Details

#codeObject



13
14
15
# File 'lib/tensorflow/status.rb', line 13

def code
    Tensorflow::TF_GetCode(c)
end

#newstatusObject



9
10
11
# File 'lib/tensorflow/status.rb', line 9

def newstatus
    self.c = Tensorflow::TF_NewStatus()
end

#StringObject



17
18
19
# File 'lib/tensorflow/status.rb', line 17

def String
    Tensorflow::TF_Message(c)
end