Sha256: 6c8ac34ab1a70475b2facb129de048eb4ddaecfecfe3e14f3d13f14def49f240
Contents?: true
Size: 710 Bytes
Versions: 15
Compression:
Stored size: 710 Bytes
Contents
module TensorStream module Debugging extend TensorStream::OpHelper def add_check_numerics_ops graph = TensorStream.get_default_graph nodes_to_process = graph.nodes.values.select { |node| node.is_a?(Operation) } nodes_to_process.each do |node| node.inputs = node.inputs.collect do |input| next if input.nil? next input if input.is_a?(Variable) if input.is_a?(Tensor) && TensorStream::Ops::FLOATING_POINT_TYPES.include?(input.data_type) TensorStream.check_numerics(input, "#{node.name}/#{input.name}", name: "check/#{node.name}/#{input.name}" ) else input end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems