Beispiel #1
0
def function_buffering_resource(string_arg,
                                target_device,
                                f,
                                buffer_size,
                                container="",
                                shared_name=None,
                                name=None):
    if shared_name is None:
        shared_name = ""
    return gen_dataset_ops.function_buffering_resource(
        string_arg=string_arg,
        target_device=target_device,
        shared_name=shared_name,
        f=f,
        buffer_size=buffer_size,
        container=container,
        name=name)
Beispiel #2
0
def function_buffering_resource(string_arg,
                                target_device,
                                f,
                                buffer_size,
                                container="",
                                shared_name=None,
                                name=None):
  if shared_name is None:
    shared_name = ""
  return gen_dataset_ops.function_buffering_resource(
      string_arg=string_arg,
      target_device=target_device,
      shared_name=shared_name,
      f=f,
      buffer_size=buffer_size,
      container=container,
      name=name)
def function_buffering_resource(string_arg,
                                target_device,
                                shared_name,
                                f,
                                buffer_size,
                                thread_pool_size=1,
                                container="",
                                name=None):
  return gen_dataset_ops.function_buffering_resource(
      string_arg=string_arg,
      target_device=target_device,
      shared_name=shared_name,
      f=f,
      buffer_size=buffer_size,
      thread_pool_size=thread_pool_size,
      container=container,
      name=name)
def function_buffering_resource(string_arg,
                                target_device,
                                shared_name,
                                f,
                                buffer_size,
                                thread_pool_size=1,
                                container="",
                                name=None):
    return gen_dataset_ops.function_buffering_resource(
        string_arg=string_arg,
        target_device=target_device,
        shared_name=shared_name,
        f=f,
        buffer_size=buffer_size,
        thread_pool_size=thread_pool_size,
        container=container,
        name=name)
def function_buffering_resource(string_arg,
                                target_device,
                                f,
                                buffer_size,
                                output_types,
                                container="",
                                shared_name=None,
                                name=None):
  """Creates a FunctionBufferingResource.

  A FunctionBufferingResource fills up a buffer by calling a function `f` on
  `target_device`. `f` should take in only a single string argument as input.

  Args:
    string_arg: The single string argument to the function.
    target_device: The device to run `f` on.
    f: The function to be executed.
    buffer_size: Size of the buffer to be populated.
    output_types: The output types generated by the function.
    container: (Optional) string. Defaults to "".
    shared_name: (Optional) string.
    name: (Optional) string to name the op.

  Returns:
    Handle to a FunctionBufferingResource.
  """
  if shared_name is None:
    shared_name = ""
  return gen_dataset_ops.function_buffering_resource(
      string_arg=string_arg,
      target_device=target_device,
      shared_name=shared_name,
      f=f,
      buffer_size=buffer_size,
      container=container,
      name=name,
      output_types=output_types)