Skip to content

Commit 7293c32

Browse files
committed
ConcatV2 should be recorded #701
1 parent 14c26e7 commit 7293c32

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/TensorFlowNET.Core/Eager/EagerRunner.TFE_FastPathExecute.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,10 @@ bool SetOpAttrScalar(Context ctx, SafeOpHandle op,
380380
c_api.TFE_OpSetAttrBool(op, key, Convert.ToBoolean(value));
381381
break;
382382
case TF_AttrType.TF_ATTR_INT:
383-
attr_list_sizes[key] = Convert.ToInt64(value);
384-
c_api.TFE_OpSetAttrInt(op, key, attr_list_sizes[key]);
383+
var size = Convert.ToInt64(value);
384+
c_api.TFE_OpSetAttrInt(op, key, size);
385+
if (attr_list_sizes != null)
386+
attr_list_sizes[key] = size;
385387
break;
386388
case TF_AttrType.TF_ATTR_FLOAT:
387389
c_api.TFE_OpSetAttrFloat(op, key, Convert.ToSingle(value));

src/TensorFlowNET.Keras/Layers/Reshaping/Reshape.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public Reshape(ReshapeArgs args)
2222
protected override Tensors Call(Tensors inputs, Tensor state = null, bool is_training = false)
2323
{
2424
var shape_tensor = array_ops.shape(inputs);
25-
var shape = new List<int> { shape_tensor.shape[0] };
25+
var shape = new List<int> { inputs.shape[0] };
2626
shape.AddRange(args.TargetShape.dims);
2727

2828
var result = array_ops.reshape(inputs, shape.ToArray());

0 commit comments

Comments
 (0)