diff --git a/src/TensorFlowNET.Core/Graphs/Graph.cs b/src/TensorFlowNET.Core/Graphs/Graph.cs index adfbfcb9..ab228c47 100644 --- a/src/TensorFlowNET.Core/Graphs/Graph.cs +++ b/src/TensorFlowNET.Core/Graphs/Graph.cs @@ -446,9 +446,9 @@ namespace Tensorflow /// The name of the `Tensor` to return. /// If does not correspond to a tensor in this graph. /// The `Tensor` with the given . - public ITensorOrOperation get_tensor_by_name(string name) + public Tensor get_tensor_by_name(string name) { - return this.as_graph_element(name, allow_tensor: true, allow_operation: false); + return (Tensor)this.as_graph_element(name, allow_tensor: true, allow_operation: false); } public void __enter__()