Browse Source

Fixed Expand1d for keras 1d input.

tags/v0.60-tf.numpy
Oceania2018 4 years ago
parent
commit
96e0067061
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/TensorFlowNET.Keras/Engine/DataAdapters/DataAdapter.cs

+ 2
- 0
src/TensorFlowNET.Keras/Engine/DataAdapters/DataAdapter.cs View File

@@ -21,6 +21,8 @@ namespace Tensorflow.Keras.Engine.DataAdapters

public virtual (Tensor, Tensor) Expand1d(Tensor x, Tensor y)
{
if (x.TensorShape.ndim == 1)
x = array_ops.expand_dims(x, axis: -1);
if (y.TensorShape.ndim == 1)
y = array_ops.expand_dims(y, axis: -1);
return (x, y);


Loading…
Cancel
Save