You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tf.layers.dense does not pass through name to the Keras Layer #484
I don't see the mechanism to do this in the TF.Net keras layer so for now I'll just make my own little dense layer. This is just a heads up that w/o fixing this it may be hard to load some pre-trained models.
I'm tired atm and I keep screwing up the pull request. But the following unit test will surface the bug.
namespace TensorFlowNET.UnitTest.layers_test
{
[TestClass]
public class dense
{
[TestMethod]
public void Case1()
{
var sess = tf.Session().as_default();
var x = tf.ones(new TensorShape(10, 10));
var y = tf.layers.dense(x, 20, name: "test");
Assert.AreEqual("test/BiasAdd:0", y.name); // test name_scope
Assert.AreEqual("test/bias", y.op.inputs[1].op.inputs[0]); // test variable_scope
}
}
}
Activity
Oceania2018 commentedon Jan 6, 2020
@moloneymb Do you have any Unit Test so that I can reproduce the problem?
moloneymb commentedon Jan 6, 2020
I can make a unit test tomorrow.
moloneymb commentedon Jan 7, 2020
I'm tired atm and I keep screwing up the pull request. But the following unit test will surface the bug.
tf.layers.dense does not pass through name to the Keras Layer #484