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
C# Tensorflow.NET package only handles Tensorflow.Numpy.NDArray but not NumSharp.NDArray type. Lean is not able to handle Tensorflow.Numpy.NDArray with the following error:
System.TypeInitializationException: The type initializer for 'Tensorflow.Binding' threw an exception.
---> Tensorflow.RuntimeError: Tensorflow.NET cannot find a backend. Please install one of the following packages for your program: SciSharp.TensorFlow.Redist, SciSharp.TensorFlow.Redist-Linux-GPU, SciSharp.TensorFlow.Redist-Windows-GPU. For more details, please visit https://github.com/SciSharp/TensorFlow.NET. If it still not work after installing the backend, please submit an issue to https://github.com/SciSharp/TensorFlow.NET/issues
at Tensorflow.tensorflow..ctor()
at Tensorflow.Binding..cctor()
--- End of inner exception stack trace ---
at Tensorflow.Binding.get_tf()
at Tensorflow.NumPy.AutoNumPyAttribute.OnEntry(MethodExecutionArgs args)
at Tensorflow.NumPy.np.zeros(Shape shape, TF_DataType dtype)
at Submission#6.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
at Tensorflow.Binding.get_tf()
at Tensorflow.NumPy.AutoNumPyAttribute.OnEntry(MethodExecutionArgs args)
at Tensorflow.NumPy.np.zeros(Shape shape, TF_DataType dtype)
at Submission#6.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
And also cannot load the Tensorflow backend
System.DllNotFoundException: Unable to load shared library 'tensorflow' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libtensorflow: cannot open shared object file: No such file or directory
at Tensorflow.c_api.TF_NewGraph()
at Tensorflow.Graph..ctor()
at Tensorflow.DefaultGraphStack.get_default()
at Tensorflow.ops.get_default_graph()
at Tensorflow.Keras.Utils.base_layer_utils.get_default_graph_uid_map()
at Tensorflow.Keras.Utils.base_layer_utils.unique_layer_name(String name, Dictionary`2 name_uid_map, String[] avoid_names, Boolean zero_based)
at Tensorflow.Keras.Engine.Layer._init_set_name(String name, Boolean zero_based)
at Tensorflow.Keras.Engine.Layer.Initialize(LayerArgs args)
at Tensorflow.Keras.Engine.Layer..ctor(LayerArgs args)
at Tensorflow.Keras.Layers.InputLayer..ctor(InputLayerArgs args)
at Tensorflow.Keras.Layers.LayersApi.Input(Shape shape, Int32 batch_size, String name, TF_DataType dtype, Boolean sparse, Tensor tensor, Boolean ragged, TypeSpec type_spec, Shape batch_input_shape, Shape batch_shape)
at Tensorflow.Keras.KerasInterface.Input(Shape shape, Int32 batch_size, String name, TF_DataType dtype, Boolean sparse, Tensor tensor, Boolean ragged, TypeSpec type_spec, Shape batch_input_shape, Shape batch_shape)
at Submission#7.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
at Tensorflow.c_api.TF_NewGraph()
at Tensorflow.Graph..ctor()
at Tensorflow.DefaultGraphStack.get_default()
at Tensorflow.ops.get_default_graph()
at Tensorflow.Keras.Utils.base_layer_utils.get_default_graph_uid_map()
at Tensorflow.Keras.Utils.base_layer_utils.unique_layer_name(String name, Dictionary`2 name_uid_map, String[] avoid_names, Boolean zero_based)
at Tensorflow.Keras.Engine.Layer._init_set_name(String name, Boolean zero_based)
at Tensorflow.Keras.Engine.Layer.Initialize(LayerArgs args)
at Tensorflow.Keras.Engine.Layer..ctor(LayerArgs args)
...
at Tensorflow.Keras.Layers.LayersApi.Input(Shape shape, Int32 batch_size, String name, TF_DataType dtype, Boolean sparse, Tensor tensor, Boolean ragged, TypeSpec type_spec, Shape batch_input_shape, Shape batch_shape)
at Tensorflow.Keras.KerasInterface.Input(Shape shape, Int32 batch_size, String name, TF_DataType dtype, Boolean sparse, Tensor tensor, Boolean ragged, TypeSpec type_spec, Shape batch_input_shape, Shape batch_shape)
at Submission#7.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
Actual Behavior
C# Tensorflow.NET package only handles
Tensorflow.Numpy.NDArray
but notNumSharp.NDArray
type. Lean is not able to handleTensorflow.Numpy.NDArray
with the following error:And also cannot load the Tensorflow backend
Potential Solution
Install the tensorflow backend (python?)
Reproducing the Problem
https://www.quantconnect.com/terminal/processCache?request=embedded_backtest_3b956d04556623f3e73a03e5b7905d58.html
Run the notebook
System Information
QC cloud
Checklist
master
branchThe text was updated successfully, but these errors were encountered: