|
|
@@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using NumSharp; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Text; |
|
|
|
using Tensorflow.Data; |
|
|
@@ -7,6 +8,20 @@ namespace Tensorflow |
|
|
|
{ |
|
|
|
public class DatasetManager |
|
|
|
{ |
|
|
|
public IDatasetV2 from_generator<T>(IEnumerable<T> generator, TF_DataType[] output_types, TensorShape[] output_shapes) |
|
|
|
=> new GeneratorDataset(); |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Creates a `Dataset` with a single element, comprising the given tensors. |
|
|
|
/// </summary> |
|
|
|
/// <param name="tensors"></param> |
|
|
|
/// <returns></returns> |
|
|
|
public IDatasetV2 from_tensor(NDArray tensors) |
|
|
|
=> new TensorDataset(tensors); |
|
|
|
|
|
|
|
public IDatasetV2 from_tensor(Tensor tensors) |
|
|
|
=> new TensorDataset(tensors); |
|
|
|
|
|
|
|
public IDatasetV2 from_tensor_slices(Tensor features, Tensor labels) |
|
|
|
=> new TensorSliceDataset(features, labels); |
|
|
|
|
|
|
|