Browse Source

release v0.10.7.2.

tags/v0.12
Oceania2018 6 years ago
parent
commit
2c8771429c
5 changed files with 22 additions and 15 deletions
  1. +2
    -2
      src/TensorFlowNET.Core/Graphs/Graph.cs
  2. +10
    -4
      src/TensorFlowNET.Core/Sessions/Session.cs
  3. +3
    -3
      src/TensorFlowNET.Core/TensorFlowNET.Core.csproj
  4. +5
    -4
      src/TensorFlowNET.Core/Tensors/Tensor.cs
  5. +2
    -2
      test/TensorFlowNET.Examples/ImageProcessing/RetrainImageClassifier.cs

+ 2
- 2
src/TensorFlowNET.Core/Graphs/Graph.cs View File

@@ -445,12 +445,12 @@ namespace Tensorflow
public void Dispose()
{
if (_handle != IntPtr.Zero)
/*if (_handle != IntPtr.Zero)
c_api.TF_DeleteGraph(_handle);

_handle = IntPtr.Zero;

GC.SuppressFinalize(this);
GC.SuppressFinalize(this);*/
}

/// <summary>


+ 10
- 4
src/TensorFlowNET.Core/Sessions/Session.cs View File

@@ -83,13 +83,19 @@ namespace Tensorflow

public void Dispose()
{
if (_session != IntPtr.Zero)
IntPtr h = IntPtr.Zero;
lock (this)
{
h = _session;
_session = IntPtr.Zero;
}
if (h != IntPtr.Zero)
{
var status = new Status();
c_api.TF_DeleteSession(_session, status);
c_api.TF_DeleteSession(h, status);
status.Check(true);
}

_session = IntPtr.Zero;
GC.SuppressFinalize(this);
}



+ 3
- 3
src/TensorFlowNET.Core/TensorFlowNET.Core.csproj View File

@@ -5,7 +5,7 @@
<AssemblyName>TensorFlow.NET</AssemblyName>
<RootNamespace>Tensorflow</RootNamespace>
<TargetTensorFlow>1.14.0</TargetTensorFlow>
<Version>0.10.7</Version>
<Version>0.10.7.2</Version>
<Authors>Haiping Chen, Meinrad Recheis</Authors>
<Company>SciSharp STACK</Company>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -17,7 +17,7 @@
<PackageTags>TensorFlow, NumSharp, SciSharp, MachineLearning, TensorFlow.NET, C#</PackageTags>
<Description>Google's TensorFlow full binding in .NET Standard.
Docs: https://tensorflownet.readthedocs.io</Description>
<AssemblyVersion>0.10.7.0</AssemblyVersion>
<AssemblyVersion>0.10.7.2</AssemblyVersion>
<PackageReleaseNotes>Changes since v0.9.0:

1. Added full connected Convolution Neural Network example.
@@ -36,7 +36,7 @@ Docs: https://tensorflownet.readthedocs.io</Description>
14. Fix TF_String endcode and decode.
15. Fix Tensor memory leak.</PackageReleaseNotes>
<LangVersion>7.2</LangVersion>
<FileVersion>0.10.7.0</FileVersion>
<FileVersion>0.10.7.2</FileVersion>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<SignAssembly>true</SignAssembly>


+ 5
- 4
src/TensorFlowNET.Core/Tensors/Tensor.cs View File

@@ -135,7 +135,9 @@ namespace Tensorflow
{
var status = new Status();
var output = _as_tf_output();
return c_api.TF_GraphGetTensorNumDims(op.graph, output, status);
int ndim = c_api.TF_GraphGetTensorNumDims(op.graph, output, status);
status.Check();
return ndim;
}
else
{
@@ -394,15 +396,14 @@ namespace Tensorflow

public void Dispose()
{
IntPtr h=IntPtr.Zero;
IntPtr h = IntPtr.Zero;
lock (this)
{
h = _handle;
_handle=IntPtr.Zero;
_handle = IntPtr.Zero;
}
if (h != IntPtr.Zero)
c_api.TF_DeleteTensor(h);
GC.SuppressFinalize(this);
}



+ 2
- 2
test/TensorFlowNET.Examples/ImageProcessing/RetrainImageClassifier.cs View File

@@ -83,10 +83,10 @@ namespace TensorFlowNET.Examples
#region For debug purpose
// predict images
Predict(null);
// Predict(null);

// load saved pb and test new images.
Test(null);
// Test(null);
#endregion



Loading…
Cancel
Save