public void StandardNetworkBuilderExtensionsBuildsSoftmaxActivation() { var network = new StandardNetworkBuilder() .With.ANewLayerOfInputUnits(2) .ConnectedTo.ANewLayerOfHiddenUnits(2).With.SoftmaxActivation() .ConnectedTo.ANewLayerOfOutputUnits(2).With.SoftmaxActivation() .And.Build().And.GetNetwork(); network.ElementAt(1).Select(u => u.UnitActivation).Should().AllBeOfType <SoftmaxUnitActivation <IUnit, IConnection, IUnitActivationCreatable <IUnit> > >(); }
public void StandardNetworkBuilderExtensionsBuildsHyperbolicTangentActivation() { var network = new StandardNetworkBuilder() .With.ANewLayerOfInputUnits(2) .ConnectedTo.ANewLayerOfHiddenUnits(2).With.HyperbolicTangentActivation() .ConnectedTo.ANewLayerOfOutputUnits(2).With.HyperbolicTangentActivation() .And.Build().And.GetNetwork(); network.ElementAt(1).Select(u => u.UnitActivation).Should().AllBeOfType <HyperbolicTangentUnitActivation <IUnit> >(); }