Skip to content

Commit ba49e18

Browse files
committed
Document shortcoming for Issue migueldeicaza#133
1 parent 793f149 commit ba49e18

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

TensorFlowSharp/OperationsExtras.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,10 @@ public TFOutput Variable (TFOutput initialValue, out TFOutput value, string oper
205205
public TFOutput Variable (TFOutput initialValue, string operName = null)
206206
{
207207
var scopeName = MakeName ("Variable", operName);
208-
209208
using (var newScope = WithScope (scopeName)) {
210209
var type = initialValue.OutputType;
210+
211+
// This should be VariableV2, but requires Ref support in the C API.
211212
var handle = VarHandleOp (type, new TFShape (GetShape (initialValue)));
212213
using (var aScope = WithScope ("Assign")) {
213214
var init = AssignVariableOp (handle, initialValue);

0 commit comments

Comments
 (0)