SciSharp / TensorFlow.NET

.NET Standard bindings for Google's TensorFlow for developing, training and deploying Machine Learning models in C# and F#.
https://scisharp.github.io/tensorflow-net-docs
Apache License 2.0
3.25k stars 524 forks source link

runtime error in VdCnn.cs #328

Open Hondo2019 opened 5 years ago

Hondo2019 commented 5 years ago

Just playing with your VdCnn sample, which throws excpetion 'Unable to find an entry point namend 'AddControlInput' in DLL tensorflow. Happens on that line:

                   // batch normalization
                    conv = tf.layers.batch_normalization(conv, training: is_training);

The references are SciSharp.TensorFlow.Redist v1.14.0 and TensorFlow.NET v0.10.3

Thanks for your help!

Oceania2018 commented 5 years ago

Have to replace tensorflow with this one: https://github.com/SciSharp/TensorFlow.NET/tree/master/tensorflowlib/runtimes/win-x64/native

Hondo2019 commented 5 years ago

Hi! I just upgraded to your latest TensorFlow.NET 0.10.10 and used the dll you provided.

Now I get 'can't get graident function through get_gradient_function TopKV2' on this line:

           tf_with(tf.control_dependencies(update_ops.Select(x => (Operation)x).ToArray()), delegate
            {
                var adam = tf.train.AdamOptimizer(learning_rate);
                adam.minimize(loss, global_step: global_step);
            });
Hondo2019 commented 5 years ago

Stack trace:

System.NotImplementedException: can't get graident function through get_gradient_function TopKV2 at Tensorflow.ops.get_gradient_function(Operation op) at Tensorflow.gradients_util.<>cDisplayClass0_0.<_GradientsHelper>b0(NameScope scope) at Tensorflow.Python.tf_with[T](T py, Action`1 action)