Browse Source

Removed exception swallowing from tf_with clauses, fixed #404

Removed exception swallowing from tf_with clauses, fixed #404
tags/v0.12
Eli Belash GitHub 6 years ago
parent
commit
bd55502907
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 17 deletions
  1. +1
    -17
      src/TensorFlowNET.Core/Binding.Util.cs

+ 1
- 17
src/TensorFlowNET.Core/Binding.Util.cs View File

@@ -106,11 +106,6 @@ namespace Tensorflow
py.__enter__();
action(py);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
throw;
}
finally
{
py.__exit__();
@@ -126,11 +121,6 @@ namespace Tensorflow
py.__enter__();
action(py);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
throw;
}
finally
{
py.__exit__();
@@ -146,11 +136,6 @@ namespace Tensorflow
py.__enter__();
return action(py);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
return default(TOut);
}
finally
{
py.__exit__();
@@ -190,8 +175,7 @@ namespace Tensorflow

public static IEnumerable<(T1, T2)> zip<T1, T2>(IEnumerable<T1> e1, IEnumerable<T2> e2)
{
foreach (var (v1, v2) in e1.Zip(e2, (t1, t2) => (t1, t2)))
yield return (v1, v2);
return e1.Zip(e2, (t1, t2) => (t1, t2));
}

public static IEnumerable<(TKey, TValue)> enumerate<TKey, TValue>(Dictionary<TKey, TValue> values)


Loading…
Cancel
Save