Browse Source

Fix sparse_categorical_crossentropy.

tags/v0.100.4-load-saved-model
Haiping Chen 2 years ago
parent
commit
9aa8f758f4
2 changed files with 3 additions and 4 deletions
  1. +2
    -3
      src/TensorFlowNET.Keras/BackendImpl.cs
  2. +1
    -1
      test/TensorFlowNET.Keras.UnitTest/MultiThreadsTest.cs

+ 2
- 3
src/TensorFlowNET.Keras/BackendImpl.cs View File

@@ -307,9 +307,8 @@ namespace Tensorflow.Keras
var update_shape = target_rank > -1 && output_rank > -1 && target_rank != output_rank - 1;
if (update_shape)
{
/*var target = flatten(target);
output = tf.reshape(output, [-1, output_shape[-1]]);*/
throw new NotImplementedException("");
target = tf.reshape(target, -1);
output = tf.reshape(output, (-1, output.shape[-1]));
}

if (ignore_class.HasValue)


+ 1
- 1
test/TensorFlowNET.Keras.UnitTest/MultiThreadsTest.cs View File

@@ -8,7 +8,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TensorFlowNET.Keras.UnitTest
{
[TestClass, Ignore]
[TestClass]
public class MultiThreads
{
[TestMethod]


Loading…
Cancel
Save