Browse Source

data_flow.dynamic_partition

tags/v0.13
Oceania2018 6 years ago
parent
commit
ca39124dd3
2 changed files with 26 additions and 1 deletions
  1. +13
    -1
      src/TensorFlowNET.Core/APIs/tf.data_flow.cs
  2. +13
    -0
      src/TensorFlowNET.Core/Operations/gen_data_flow_ops.cs

+ 13
- 1
src/TensorFlowNET.Core/APIs/tf.data_flow.cs View File

@@ -27,7 +27,19 @@ namespace Tensorflow
/// <param name="data"></param>
/// <param name="name"></param>
/// <returns></returns>
public static Tensor dynamic_stitch(Tensor[] indices, Tensor[] data, string name = null)
public Tensor dynamic_stitch(Tensor[] indices, Tensor[] data, string name = null)
=> gen_data_flow_ops.dynamic_stitch(indices, data, name: name);

/// <summary>
/// Partitions `data` into `num_partitions` tensors using indices from `partitions`.
/// </summary>
/// <param name="data"></param>
/// <param name="partitions"></param>
/// <param name="num_partitions">The number of partitions to output.</param>
/// <param name="name"></param>
/// <returns></returns>
public Tensor[] dynamic_partition(Tensor data, Tensor partitions, int num_partitions,
string name = null)
=> gen_data_flow_ops.dynamic_partition(data, partitions, num_partitions, name: name);
}
}

+ 13
- 0
src/TensorFlowNET.Core/Operations/gen_data_flow_ops.cs View File

@@ -27,6 +27,19 @@ namespace Tensorflow
return _op.output;
}

public static Tensor[] dynamic_partition(Tensor data, Tensor partitions, int num_partitions,
string name = null)
{
var _op = _op_def_lib._apply_op_helper("DynamicPartition", name, new
{
data,
partitions,
num_partitions
});

return _op.outputs;
}

public static (Tensor, Tensor) tensor_array_v3<T>(T size, TF_DataType dtype = TF_DataType.DtInvalid,
TensorShape element_shape = null, bool dynamic_size = false, bool clear_after_read = true,
bool identical_element_shapes = false, string tensor_array_name = "", string name = null)


Loading…
Cancel
Save