| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 56a64da commit 4f88109
8 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,5 +7,7 @@ namespace Tensorflow.Keras | |||
| 7 | 7 | public interface IInitializersApi | |
| 8 | 8 | { | |
| 9 | 9 | IInitializer Orthogonal(float gain = 1.0f, int? seed = null); | |
| 10 | + | ||
| 11 | + IInitializer HeNormal(int? seed = null); | ||
| 10 | 12 | } | |
| 11 | 13 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,11 @@ | |||
| 1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> | |
| 2 | 2 | ||
| 3 | 3 | <PropertyGroup> | |
| 4 | - <TargetFramework>netstandard2.0</TargetFramework> | ||
| 4 | + <TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks> | ||
| 5 | 5 | <AssemblyName>Tensorflow.Binding</AssemblyName> | |
| 6 | 6 | <RootNamespace>Tensorflow</RootNamespace> | |
| 7 | - <TargetTensorFlow>2.2.0</TargetTensorFlow> | ||
| 8 | - <Version>0.100.0</Version> | ||
| 7 | + <TargetTensorFlow>2.10.0</TargetTensorFlow> | ||
| 8 | + <Version>0.100.1</Version> | ||
| 9 | 9 | <LangVersion>10.0</LangVersion> | |
| 10 | 10 | <Nullable>enable</Nullable> | |
| 11 | 11 | <Authors>Haiping Chen, Meinrad Recheis, Eli Belash</Authors> | |
@@ -20,7 +20,7 @@ | |||
| 20 | 20 | <Description>Google's TensorFlow full binding in .NET Standard. | |
| 21 | 21 | Building, training and infering deep learning models. | |
| 22 | 22 | https://tensorflownet.readthedocs.io</Description> | |
| 23 | - <AssemblyVersion>0.100.0.0</AssemblyVersion> | ||
| 23 | + <AssemblyVersion>0.100.1.0</AssemblyVersion> | ||
| 24 | 24 | <PackageReleaseNotes> | |
| 25 | 25 | tf.net 0.100.x and above are based on tensorflow native 2.10.0 | |
| 26 | 26 | ||
@@ -38,7 +38,7 @@ https://tensorflownet.readthedocs.io</Description> | |||
| 38 | 38 | tf.net 0.7x.x aligns with TensorFlow v2.7.x native library. | |
| 39 | 39 | tf.net 0.10x.x aligns with TensorFlow v2.10.x native library. | |
| 40 | 40 | </PackageReleaseNotes> | |
| 41 | - <FileVersion>0.100.0.0</FileVersion> | ||
| 41 | + <FileVersion>0.100.1.0</FileVersion> | ||
| 42 | 42 | <PackageLicenseFile>LICENSE</PackageLicenseFile> | |
| 43 | 43 | <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | |
| 44 | 44 | <SignAssembly>true</SignAssembly> | |
@@ -108,7 +108,7 @@ https://tensorflownet.readthedocs.io</Description> | |||
| 108 | 108 | ||
| 109 | 109 | <ItemGroup> | |
| 110 | 110 | <PackageReference Include="MethodBoundaryAspect.Fody" Version="2.0.148" /> | |
| 111 | - <PackageReference Include="Protobuf.Text" Version="0.5.0" /> | ||
| 111 | + <PackageReference Include="Protobuf.Text" Version="0.6.0" /> | ||
| 112 | 112 | <PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" /> | |
| 113 | 113 | </ItemGroup> | |
| 114 | 114 | </Project> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -65,12 +65,7 @@ protected void _init_graph_network(Tensors inputs, Tensors outputs) | |||
| 65 | 65 | } | |
| 66 | 66 | ||
| 67 | 67 | // Keep track of the network's nodes and layers. | |
| 68 | - (NetworkNodes, NodesByDepth, var layers, _) = MapGraphNetwork(inputs, outputs); | ||
| 69 | - | ||
| 70 | - if (!_self_tracked_trackables.Any()) | ||
| 71 | - { | ||
| 72 | - _self_tracked_trackables = layers; | ||
| 73 | - } | ||
| 68 | + (NetworkNodes, NodesByDepth, _self_tracked_trackables, _) = MapGraphNetwork(inputs, outputs); | ||
| 74 | 69 | ||
| 75 | 70 | // Build self.input_names and self.output_names. | |
| 76 | 71 | _set_output_names(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -110,6 +110,8 @@ public void add(ILayer layer) | |||
| 110 | 110 | } | |
| 111 | 111 | else if (outputs != null) | |
| 112 | 112 | { | |
| 113 | + // If the model is being built continuously on top of an input layer: | ||
| 114 | + // refresh its output. | ||
| 113 | 115 | outputs = layer.Apply(outputs); | |
| 114 | 116 | built = true; | |
| 115 | 117 | } | |
@@ -155,7 +157,7 @@ void _build_graph_network_for_inferred_shape(Shape input_shape, TF_DataType inpu | |||
| 155 | 157 | Tensors layer_output = null; | |
| 156 | 158 | Tensors outputs = null; | |
| 157 | 159 | List<INode> created_nodes = new List<INode>(); | |
| 158 | - foreach (var layer in _self_tracked_trackables) | ||
| 160 | + foreach (var layer in args.Layers) | ||
| 159 | 161 | { | |
| 160 | 162 | clear_previously_created_nodes(layer, _created_nodes); | |
| 161 | 163 | layer_output = layer.Apply(layer_input); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,7 +25,7 @@ public partial class InitializersApi : IInitializersApi | |||
| 25 | 25 | /// </summary> | |
| 26 | 26 | /// <param name="seed"></param> | |
| 27 | 27 | /// <returns></returns> | |
| 28 | - public IInitializer he_normal(int? seed = null) | ||
| 28 | + public IInitializer HeNormal(int? seed = null) | ||
| 29 | 29 | { | |
| 30 | 30 | return new VarianceScaling(factor: 2.0f, mode: "fan_in", seed: seed); | |
| 31 | 31 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,6 +45,11 @@ public override void build(Shape input_shape) | |||
| 45 | 45 | } | |
| 46 | 46 | } | |
| 47 | 47 | ||
| 48 | + protected override Tensors Call(Tensors inputs, Tensor state = null, bool? training = null) | ||
| 49 | + { | ||
| 50 | + return base.Call(inputs, state, training); | ||
| 51 | + } | ||
| 52 | + | ||
| 48 | 53 | private static RNNArgs PreConstruct(RNNArgs args) | |
| 49 | 54 | { | |
| 50 | 55 | if (args.Kwargs == null) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,11 +33,16 @@ public override void build(Shape input_shape) | |||
| 33 | 33 | if (args.UseBias) | |
| 34 | 34 | { | |
| 35 | 35 | bias = add_weight("bias", (args.Units), | |
| 36 | - initializer: args.RecurrentInitializer | ||
| 36 | + initializer: args.BiasInitializer | ||
| 37 | 37 | ); | |
| 38 | 38 | } | |
| 39 | 39 | ||
| 40 | 40 | built = true; | |
| 41 | 41 | } | |
| 42 | + | ||
| 43 | + protected override Tensors Call(Tensors inputs, Tensor state = null, bool? training = null) | ||
| 44 | + { | ||
| 45 | + return base.Call(inputs, state, training); | ||
| 46 | + } | ||
| 42 | 47 | } | |
| 43 | 48 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,13 +1,13 @@ | |||
| 1 | 1 | <Project Sdk="Microsoft.NET.Sdk"> | |
| 2 | 2 | ||
| 3 | 3 | <PropertyGroup> | |
| 4 | - <TargetFramework>netstandard2.0</TargetFramework> | ||
| 4 | + <TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks> | ||
| 5 | 5 | <AssemblyName>Tensorflow.Keras</AssemblyName> | |
| 6 | 6 | <LangVersion>10.0</LangVersion> | |
| 7 | 7 | <Nullable>enable</Nullable> | |
| 8 | 8 | <RootNamespace>Tensorflow.Keras</RootNamespace> | |
| 9 | 9 | <Platforms>AnyCPU;x64</Platforms> | |
| 10 | - <Version>0.10.0</Version> | ||
| 10 | + <Version>0.10.1</Version> | ||
| 11 | 11 | <Authors>Haiping Chen</Authors> | |
| 12 | 12 | <Product>Keras for .NET</Product> | |
| 13 | 13 | <Copyright>Apache 2.0, Haiping Chen 2021</Copyright> | |
@@ -37,8 +37,8 @@ Keras is an API designed for human beings, not machines. Keras follows best prac | |||
| 37 | 37 | <RepositoryType>Git</RepositoryType> | |
| 38 | 38 | <SignAssembly>true</SignAssembly> | |
| 39 | 39 | <AssemblyOriginatorKeyFile>Open.snk</AssemblyOriginatorKeyFile> | |
| 40 | - <AssemblyVersion>0.10.0.0</AssemblyVersion> | ||
| 41 | - <FileVersion>0.10.0.0</FileVersion> | ||
| 40 | + <AssemblyVersion>0.10.1.0</AssemblyVersion> | ||
| 41 | + <FileVersion>0.10.1.0</FileVersion> | ||
| 42 | 42 | <PackageLicenseFile>LICENSE</PackageLicenseFile> | |
| 43 | 43 | <Configurations>Debug;Release;GPU</Configurations> | |
| 44 | 44 | </PropertyGroup> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments