SciSharp / NumSharp

High Performance Computation for N-D Tensors in .NET, similar API to NumPy.
https://github.com/SciSharp
Apache License 2.0
1.36k stars 189 forks source link

Missing np.tile? #397

Open QadiymStewart opened 4 years ago

QadiymStewart commented 4 years ago

Is np.tile implemented in this library as of yet?

simonbuehler commented 4 years ago

hi,

bumped into the same issue, is there a workaround for something like np.tile(center, (1, 1, 2 * num_anchors)); or maybe even better a working tile implementation?

QadiymStewart commented 4 years ago

hi,

bumped into the same issue, is there a workaround for something like np.tile(center, (1, 1, 2 * num_anchors)); or maybe even better a working tile implementation?

Switched to https://github.com/Quansight-Labs/numpy.net

simonbuehler commented 4 years ago

@QadiymStewart thanks for your reply, a pity that tensorflow.net depends on NumSharp so i can't switch :/
@Oceania2018 are there plans to implement this like inNumpyDotNet/shape_base.cs ?

Oceania2018 commented 4 years ago

@simonbuehler Try to use the built-in functions of tensorflow. https://www.tensorflow.org/api_docs/python/tf/tile

simonbuehler commented 4 years ago

is there already a nuget with a Tensor -> NDarray method?

Oceania2018 commented 4 years ago

@simonbuehler You can create tensor directly from Tensor -> NDArray and vice verse.

simonbuehler commented 4 years ago

just for info, unfortunatly var center_tiled = tf.tile(temp , temp2); throws a NullReferenceException guess this is a TensorFlow.NET issue, nevertheless a numsharp implementation would be awesome!

    TensorFlow.NET.dll!Tensorflow.Tensor._as_tf_output()    Unbekannt
    TensorFlow.NET.dll!Tensorflow.ops._create_c_op<object>(Tensorflow.Graph graph, Tensorflow.NodeDef node_def, object[] inputs, Tensorflow.Operation[] control_inputs) Unbekannt
    TensorFlow.NET.dll!Tensorflow.Operation.Operation(Tensorflow.NodeDef node_def, Tensorflow.Graph g, Tensorflow.Tensor[] inputs, Tensorflow.TF_DataType[] output_types, Tensorflow.ITensorOrOperation[] control_inputs, Tensorflow.TF_DataType[] input_types, string original_op, Tensorflow.OpDef op_def)    Unbekannt
    TensorFlow.NET.dll!Tensorflow.Graph.create_op(string op_type, Tensorflow.Tensor[] inputs, Tensorflow.TF_DataType[] dtypes, Tensorflow.TF_DataType[] input_types, string name, System.Collections.Generic.Dictionary<string, Tensorflow.AttrValue> attrs, Tensorflow.OpDef op_def)   Unbekannt
    TensorFlow.NET.dll!Tensorflow.OpDefLibrary._apply_op_helper.AnonymousMethod__0(Tensorflow.ops.NameScope scope)  Unbekannt
    TensorFlow.NET.dll!Tensorflow.Binding.tf_with<System.__Canon, System.__Canon>(System.__Canon py, System.Func<System.__Canon, System.__Canon> action)    Unbekannt
    TensorFlow.NET.dll!Tensorflow.gen_array_ops.tile<Tensorflow.Tensor>(Tensorflow.Tensor input, Tensorflow.Tensor multiples, string name)  Unbekannt
simonbuehler commented 4 years ago

@Oceania2018 hi, are there any chances that np.tile could be implemented?