@@ -37,7 +37,7 @@ namespace Tensorflow.Keras | |||||
public void set_floatx(TF_DataType floatx) => _FLOATX = floatx; | public void set_floatx(TF_DataType floatx) => _FLOATX = floatx; | ||||
public NDArray cast_to_floatx(NDArray x) => np.array(x, dtype: _FLOATX.as_numpy_datatype()); | |||||
//public NDArray cast_to_floatx(NDArray x) => np.array(x, dtype: _FLOATX.as_numpy_datatype()); | |||||
public ImageDataFormat image_data_format() => _IMAGE_DATA_FORMAT; | public ImageDataFormat image_data_format() => _IMAGE_DATA_FORMAT; | ||||
@@ -42,7 +42,7 @@ namespace Tensorflow | |||||
{ | { | ||||
var type = values[0].GetType(); | var type = values[0].GetType(); | ||||
var nd = new NDArray(type, values.Count); | var nd = new NDArray(type, values.Count); | ||||
nd.SetData(values.ToArray()); | |||||
nd.ReplaceData(values.ToArray()); | |||||
return nd; | return nd; | ||||
} | } | ||||
@@ -5,7 +5,7 @@ | |||||
<AssemblyName>TensorFlow.NET</AssemblyName> | <AssemblyName>TensorFlow.NET</AssemblyName> | ||||
<RootNamespace>Tensorflow</RootNamespace> | <RootNamespace>Tensorflow</RootNamespace> | ||||
<TargetTensorFlow>1.14.0</TargetTensorFlow> | <TargetTensorFlow>1.14.0</TargetTensorFlow> | ||||
<Version>0.10.0-alpha</Version> | |||||
<Version>0.10.0-beta</Version> | |||||
<Authors>Haiping Chen, Meinrad Recheis</Authors> | <Authors>Haiping Chen, Meinrad Recheis</Authors> | ||||
<Company>SciSharp STACK</Company> | <Company>SciSharp STACK</Company> | ||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||||
@@ -29,6 +29,8 @@ Learn more about .NET AI: https://medium.com/scisharp</Description> | |||||
<FileVersion>0.10.0.0</FileVersion> | <FileVersion>0.10.0.0</FileVersion> | ||||
<PackageLicenseFile>LICENSE</PackageLicenseFile> | <PackageLicenseFile>LICENSE</PackageLicenseFile> | ||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||||
<SignAssembly>true</SignAssembly> | |||||
<AssemblyOriginatorKeyFile>Open.snk</AssemblyOriginatorKeyFile> | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||||
@@ -60,7 +62,7 @@ Learn more about .NET AI: https://medium.com/scisharp</Description> | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="Google.Protobuf" Version="3.9.0" /> | <PackageReference Include="Google.Protobuf" Version="3.9.0" /> | ||||
<PackageReference Include="NumSharp" Version="0.10.3" /> | |||||
<PackageReference Include="NumSharp" Version="0.10.4" /> | |||||
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="1.14.0" /> | <PackageReference Include="SciSharp.TensorFlow.Redist" Version="1.14.0" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
@@ -68,11 +70,4 @@ Learn more about .NET AI: https://medium.com/scisharp</Description> | |||||
<Folder Include="Distribute\" /> | <Folder Include="Distribute\" /> | ||||
<Folder Include="Keras\Initializers\" /> | <Folder Include="Keras\Initializers\" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | |||||
<Reference Include="NumSharp.Core"> | |||||
<HintPath>..\..\..\..\NumSharp\src\NumSharp.Core\bin\Debug\netstandard2.0\NumSharp.Core.dll</HintPath> | |||||
</Reference> | |||||
</ItemGroup> | |||||
</Project> | </Project> |
@@ -16,7 +16,7 @@ namespace Tensorflow | |||||
{ | { | ||||
if (proto.UnknownRank) return; | if (proto.UnknownRank) return; | ||||
ReShape(proto.Dim.Select(x => (int)x.Size).ToArray()); | |||||
Reshape(proto.Dim.Select(x => (int)x.Size).ToArray()); | |||||
} | } | ||||
public TensorShape(params int[] dims) : base(dims) | public TensorShape(params int[] dims) : base(dims) | ||||
@@ -30,7 +30,7 @@ namespace TensorFlowNET.Examples.ImageProcess | |||||
/// </summary> | /// </summary> | ||||
public class DigitRecognitionRNN : IExample | public class DigitRecognitionRNN : IExample | ||||
{ | { | ||||
public bool Enabled { get; set; } = true; | |||||
public bool Enabled { get; set; } = false; | |||||
public bool IsImportingGraph { get; set; } = false; | public bool IsImportingGraph { get; set; } = false; | ||||
public string Name => "MNIST RNN"; | public string Name => "MNIST RNN"; | ||||
@@ -42,7 +42,7 @@ namespace TensorFlowNET.UnitTest | |||||
for (int i = 0; i < e.Length; i++) | for (int i = 0; i < e.Length; i++) | ||||
{ | { | ||||
if (g[i] is NDArray && e[i] is NDArray) | if (g[i] is NDArray && e[i] is NDArray) | ||||
assertItemsEqual((g[i] as NDArray).Array, (e[i] as NDArray).Array); | |||||
assertItemsEqual((g[i] as NDArray).GetData<object>(), (e[i] as NDArray).GetData<object>()); | |||||
else if (e[i] is ICollection && g[i] is ICollection) | else if (e[i] is ICollection && g[i] is ICollection) | ||||
assertEqual(g[i], e[i]); | assertEqual(g[i], e[i]); | ||||
else | else | ||||
@@ -60,7 +60,7 @@ namespace TensorFlowNET.UnitTest | |||||
{ | { | ||||
if (given is NDArray && expected is NDArray) | if (given is NDArray && expected is NDArray) | ||||
{ | { | ||||
assertItemsEqual((given as NDArray).Array, (expected as NDArray).Array); | |||||
assertItemsEqual((given as NDArray).GetData<object>(), (expected as NDArray).GetData<object>()); | |||||
return; | return; | ||||
} | } | ||||
if (given is Hashtable && expected is Hashtable) | if (given is Hashtable && expected is Hashtable) | ||||