@@ -1,5 +1,5 @@ | |||||
/***************************************************************************** | /***************************************************************************** | ||||
Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved. | |||||
Copyright 2020 Haiping Chen. All Rights Reserved. | |||||
Licensed under the Apache License, Version 2.0 (the "License"); | Licensed under the Apache License, Version 2.0 (the "License"); | ||||
you may not use this file except in compliance with the License. | you may not use this file except in compliance with the License. | ||||
@@ -43,7 +43,7 @@ namespace Tensorflow | |||||
/// </summary> | /// </summary> | ||||
public partial class c_api | public partial class c_api | ||||
{ | { | ||||
public const string TensorFlowLibName = "tensorflow"; | |||||
public const string TensorFlowLibName = @"D:\SciSharp\tensorflow-google\bazel-bin\tensorflow\tensorflow.dll"; | |||||
public static string StringPiece(IntPtr handle) | public static string StringPiece(IntPtr handle) | ||||
{ | { | ||||
@@ -24,7 +24,7 @@ namespace Tensorflow | |||||
public class DataOps | public class DataOps | ||||
{ | { | ||||
public TensorSliceDataset Dataset { get; } = new TensorSliceDataset(); | |||||
public DatasetManager Dataset { get; } = new DatasetManager(); | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -0,0 +1,13 @@ | |||||
using NumSharp; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace Tensorflow | |||||
{ | |||||
public class DatasetManager | |||||
{ | |||||
public IDatasetV2 from_tensor_slices(NDArray features, NDArray labels) | |||||
=> new TensorSliceDataset(features, labels); | |||||
} | |||||
} |
@@ -0,0 +1,11 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace Tensorflow | |||||
{ | |||||
public interface IDatasetV2 | |||||
{ | |||||
} | |||||
} |
@@ -5,16 +5,15 @@ using System.Text; | |||||
namespace Tensorflow | namespace Tensorflow | ||||
{ | { | ||||
public class TensorSliceDataset | |||||
public class TensorSliceDataset : IDatasetV2 | |||||
{ | { | ||||
public TensorSliceDataset(params NDArray[] elements) | |||||
{ | |||||
} | |||||
NDArray features; | |||||
NDArray labels; | |||||
public TensorSliceDataset from_tensor_slices(params NDArray[] elements) | |||||
public TensorSliceDataset(NDArray features, NDArray labels) | |||||
{ | { | ||||
throw new NotImplementedException(""); | |||||
this.features = features; | |||||
this.labels = labels; | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -5,7 +5,7 @@ | |||||
<AssemblyName>TensorFlow.NET</AssemblyName> | <AssemblyName>TensorFlow.NET</AssemblyName> | ||||
<RootNamespace>Tensorflow</RootNamespace> | <RootNamespace>Tensorflow</RootNamespace> | ||||
<TargetTensorFlow>2.2.0</TargetTensorFlow> | <TargetTensorFlow>2.2.0</TargetTensorFlow> | ||||
<Version>0.20.0-preview1</Version> | |||||
<Version>0.20.0-preview2</Version> | |||||
<LangVersion>8.0</LangVersion> | <LangVersion>8.0</LangVersion> | ||||
<Authors>Haiping Chen, Meinrad Recheis, Eli Belash</Authors> | <Authors>Haiping Chen, Meinrad Recheis, Eli Belash</Authors> | ||||
<Company>SciSharp STACK</Company> | <Company>SciSharp STACK</Company> | ||||