Extensor v0.1.2 Extensor.NIF

NIF wrapper module for tensorflow adapter functions

Link to this section Summary

Functions

module initialization callback

loads a saved_model from a path into a new tensorflow session

loads a graph_def protobuf into a new tensorflow session

executes the graph in a running session

Link to this section Types

Link to this type tensor_map()
tensor_map() :: %{optional(String.t()) => {integer(), tuple(), binary()}}

Link to this section Functions

Link to this function init()
init() :: :ok

module initialization callback

Link to this function tf_load_saved_model(path, tag, config_pb)
tf_load_saved_model(
  path :: String.t(),
  tag :: String.t(),
  config_pb :: binary()
) :: reference()

loads a saved_model from a path into a new tensorflow session

Link to this function tf_parse_frozen_graph(graph_pb, config_pb)
tf_parse_frozen_graph(graph_pb :: binary(), config_pb :: binary()) ::
  reference()

loads a graph_def protobuf into a new tensorflow session

Link to this function tf_run_session(session, input_tensors, output_names)
tf_run_session(
  session :: reference(),
  input_tensors :: tensor_map(),
  output_names :: [String.t()]
) :: tensor_map()

executes the graph in a running session