Browse Source

IPackable<BodyItemInRnnWhileLoop>

tags/v0.12
Oceania2018 6 years ago
parent
commit
78fe9370b9
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/TensorFlowNET.Core/Operations/NnOps/BodyItemInRnnWhileLoop.cs

+ 4
- 2
src/TensorFlowNET.Core/Operations/NnOps/BodyItemInRnnWhileLoop.cs View File

@@ -4,7 +4,7 @@ using System.Text;

namespace Tensorflow.Operations
{
internal class BodyItemInRnnWhileLoop : ICanBeFlattened, IPackable
internal class BodyItemInRnnWhileLoop : ICanBeFlattened, IPackable<BodyItemInRnnWhileLoop>
{
/// <summary>
/// int32 scalar Tensor.
@@ -37,11 +37,13 @@ namespace Tensorflow.Operations
return elements.ToArray();
}

public void Pack(object[] sequences)
public BodyItemInRnnWhileLoop Pack(object[] sequences)
{
time = sequences[0] as Tensor;
output_ta_t = new[] { sequences[1] as TensorArray };
state = sequences[2] as Tensor;

return new BodyItemInRnnWhileLoop(time, output_ta_t, state);
}
}
}

Loading…
Cancel
Save