| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 14c26e7 commit 7293c32
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -380,8 +380,10 @@ bool SetOpAttrScalar(Context ctx, SafeOpHandle op, | |||
| 380 | 380 | c_api.TFE_OpSetAttrBool(op, key, Convert.ToBoolean(value)); | |
| 381 | 381 | break; | |
| 382 | 382 | 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; | ||
| 385 | 387 | break; | |
| 386 | 388 | case TF_AttrType.TF_ATTR_FLOAT: | |
| 387 | 389 | c_api.TFE_OpSetAttrFloat(op, key, Convert.ToSingle(value)); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ public Reshape(ReshapeArgs args) | |||
| 22 | 22 | protected override Tensors Call(Tensors inputs, Tensor state = null, bool is_training = false) | |
| 23 | 23 | { | |
| 24 | 24 | 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] }; | ||
| 26 | 26 | shape.AddRange(args.TargetShape.dims); | |
| 27 | 27 | ||
| 28 | 28 | var result = array_ops.reshape(inputs, shape.ToArray()); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments