class Tensorflow::Printers::Graph
Attributes
graph[R]
Public Class Methods
new(graph)
click to toggle source
# File lib/tensorflow/printers/graph.rb, line 8 def initialize(graph) @graph = graph end
Public Instance Methods
print(io_stream=STDOUT)
click to toggle source
# File lib/tensorflow/printers/graph.rb, line 19 def print(io_stream=STDOUT) #io_stream << ERB.new(self.template, nil, trim_mode: "<>").result_with_hash(:graph => self.graph) raw = Erubi::Engine.new(self.template, filename: 'graph.erb') io_stream << eval(raw.src) end
template()
click to toggle source
# File lib/tensorflow/printers/graph.rb, line 12 def template @template ||= begin path = File.join(__dir__, 'graph.erb') File.read(path, :mode => 'rb') end end