diff --git a/src/TensorFlowNET.Core/Eager/Context.cs b/src/TensorFlowNET.Core/Eager/Context.cs
index a5bef053..3d9c875d 100644
--- a/src/TensorFlowNET.Core/Eager/Context.cs
+++ b/src/TensorFlowNET.Core/Eager/Context.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace Tensorflow
+namespace Tensorflow.Eager
{
public class Context
{
diff --git a/src/TensorFlowNET.Core/Eager/ContextOptions.cs b/src/TensorFlowNET.Core/Eager/ContextOptions.cs
new file mode 100644
index 00000000..8bc49c8d
--- /dev/null
+++ b/src/TensorFlowNET.Core/Eager/ContextOptions.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Tensorflow.Eager
+{
+ public class ContextOptions : IDisposable
+ {
+ private IntPtr _handle;
+
+ public ContextOptions()
+ {
+ _handle = c_api.TFE_NewContextOptions();
+ }
+
+ public void Dispose()
+ {
+ c_api.TFE_DeleteContextOptions(_handle);
+ }
+
+ public static implicit operator IntPtr(ContextOptions ctx)
+ {
+ return ctx._handle;
+ }
+ }
+}
diff --git a/src/TensorFlowNET.Core/Gradients/gradients_impl.py.cs b/src/TensorFlowNET.Core/Gradients/gradients_impl.py.cs
index 597c4e21..cd639427 100644
--- a/src/TensorFlowNET.Core/Gradients/gradients_impl.py.cs
+++ b/src/TensorFlowNET.Core/Gradients/gradients_impl.py.cs
@@ -102,16 +102,21 @@ namespace Tensorflow
///
private static void _MarkReachedOps(List from_ops, List reached_ops, List