Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Haiping
@Oceania2018
@BaptisteZloch need to change train_X as well.
Baptiste ZLOCH
@BaptisteZloch

@BaptisteZloch need to change train_X as well.

Yes sorry thanks now I don't get the same error I think I have to reshape my train y and x, I will find out, Thanks a lot for your help !!!

Moranic
@Moranic
There seems to be an issue where the unmanaged resources of tensors are not applying GC pressure, which causes the GC to ignore them and eventually causes the program to run out of memory. Is this a known issue?
The objects end up on the finalizer queue allright, but then are never cleared.
Haiping
@Oceania2018
@Moranic Can you PR the reproducible Unit Test? It will help us diagnose the root cause.
Moranic
@Moranic

I'm not sure, I haven't exactly found the origin yet as previously I did not have this issue. It seems to be happening in the resulting Tensor object that is returned after callling the Apply() method to a network (outside of training in this case but calling the network to make predictions). Before I was using fairly small result tensors (e.g. a categorisation problem with only 2 options), but now I'm using one that has 1300+ options; significantly more. I think the issue was masked before as the GC would at some point get triggered anyway, so that the tiny tensors from before were cleared properly. But with these large tensors, the issue happens way sooner before the GC can trigger.

I should note that I'm not using the latest TF.NET version, because I can't for the life of me get that one to run (using 2.3.1 from NuGet). Not sure if an issue like this has been solved already in 2.4.

bbhxwl
@bbhxwl
Do you have a simple example of calling Pb? If there are Pb files, how to do image recognition?
Adnan Salahuddin
@AdnanSalah84
SciSharp/SciSharp-Stack-Examples#50
I am waiting for this.
Shakerlicious
@Shakerlicious
Hi! Does anyone know how to deal with a TensorflowException where an Op isn't registered in the Tensorflow.NET binary? Trying to load my F-RCNN object detection model in ML.NET and i keep getting this error.
Alawode Oluwandabira
@oluwandabira
In this installation guide where are the prebuilt binaries being referred to?
Haiping
@Oceania2018
Alawode Oluwandabira
@oluwandabira
@Oceania2018 How do I use that link? Opening it in my browser gives an xml document and scrolling through I see a lot of keys for jar files so I'm not sure what I'm looking for
Haiping
@Oceania2018
image.png
Download the appropriate binrary file.
Alawode Oluwandabira
@oluwandabira
Thanks
Alawode Oluwandabira
@oluwandabira
How do I use NumSharp's np.power from f# ? It accepts inref<NDArray> and inref<ValueType> and I'm not sure how to use those in f#
Kevin Malenfant
@kevmal
@oluwandabira use & op... So np.power(&bleh, ...
Mike
@mikesneider
Hi, How can I load my sequential model in keras, if I have two files? XXXX.index and XXXXX.data - 00000 - of - 00001?
@Moranic did you solve your question and load the keras model?
Mike
@mikesneider

In adition to that, when I try to load my weight

model.load_weights(Path.Combine(dir, labelFile1));

I got an erro: Can't not load file or assemply HDF5CSharp I already check, and HDF5CSharp is already installed by NugetPackage and in it last version. someone with related error?

Laur Ivan
@Laur-Ivan
Hey guys. How can I create an NDArray from a C# List/ Array? I tried something like this but it doesn't work:
        List<Vector3> testList = new List<Vector3>();
        testList.Add(new Vector3(0, 1, 2));
        testList.Add(new Vector3(3, 4, 5));
        testList.Add(new Vector3(6, 7, 8));

        Vector3[] arrayTestList = testList.ToArray();
        NDArray testNdArray = np.array(arrayTestList);
Haiping
@Oceania2018
Laur Ivan
@Laur-Ivan
@Oceania2018 thank you! Now a bit more trickier question, do you know any replacemenet for https://numpy.org/doc/stable/reference/generated/numpy.linalg.lstsq.html
It seems NumSharp has numpy.linalg, but it's pretty barebones
Haiping
@Oceania2018
@Laur-Ivan linked issue SciSharp/TensorFlow.NET#823
Estellise Yukihime
@estellise-yukihime

Is "TensorFlow.NET" updated and with very few issues?

I'm thinking of using C# for Google App Engine which is the language I'm very accustomed to.

Estellise Yukihime
@estellise-yukihime

Hi SciSharp/Community,

Kindly help me on what language should I continue to choose on Google App Engine.

I will be using GAE mostly on Tensorflow and Datastore, should I continue with C# using TensorFlow.Net or stick to python?

Haiping
@Oceania2018
@estellise-yukihime I recommend take a look at https://github.com/SciSharp/SciSharp-Stack-Examples, then make your own decision.
1 reply
Estellise Yukihime
@estellise-yukihime
image.png
Hello, can I ask how to use how to use predict?
CodeRabbit957
@CodeRabbit957
Hi. My code is giving a NotImplementedException on this line:
NDArray X_train = np.array(xTrain); // xTrain = int[][]
Haiping
@Oceania2018
@CodeRabbit957 Please use mutli dims array int[,]
CodeRabbit957
@CodeRabbit957
The lack of useful error messages is making it hard to work out what's going wrong.
CodeRabbit957
@CodeRabbit957
image.png
Can someone please tell me what I doing wrong?
CodeRabbit957
@CodeRabbit957
Message=Value cannot be null. (Parameter 'source')
Source=System.Linq
StackTrace:
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Linq.Enumerable.TryGetLastTSource
at System.Linq.Enumerable.LastTSource
at Tensorflow.Keras.Layers.Dense.build(Tensors inputs)
CodeRabbit957
@CodeRabbit957
Do I need to define an input shape? If so, how? (i.e. what does input 'shape' mean?)
CodeRabbit957
@CodeRabbit957
@Oceania2018
System.ArgumentNullException
HResult=0x80004003
Message=Value cannot be null. (Parameter 'first')
Source=System.Linq
StackTrace:
at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) in //src/libraries/System.Linq/src/System/Linq/ThrowHelper.cs:line 12
at System.Linq.Enumerable.ZipTFirst,TSecond,TResult in /
/src/libraries/System.Linq/src/System/Linq/Zip.cs:line 14
at Tensorflow.Keras.Engine.Functional.run_internal_graph(Tensors inputs, Boolean training, Tensors mask)
at Tensorflow.Keras.Engine.Functional.Call(Tensors inputs, Tensor state, Nullable1 training) at Tensorflow.Keras.Engine.Layer.<>c__DisplayClass1_0.<Apply>b__0(NameScope scope) at Tensorflow.Binding.tf_with[T](T py, Action1 action)
at Tensorflow.Keras.Engine.Layer.Apply(Tensors inputs, Tensor state, Boolean training)
at Tensorflow.Keras.Engine.Model.train_step(Tensor x, Tensor y)
at Tensorflow.Keras.Engine.Model.train_step_function(OwnedIterator iterator)
at Tensorflow.Keras.Engine.Model.FitInternal(Int32 epochs, Int32 verbose)
at Tensorflow.Keras.Engine.Model.fit(NDArray x, NDArray y, Int32 batch_size, Int32 epochs, Int32 verbose, Single validation_split, Boolean shuffle, Int32 initial_epoch, Int32 max_queue_size, Int32 workers, Boolean use_multiprocessing)
at MyraTest3.Chatbot.Model.TrainModel(Int32[,] xTrain, Int32[] yTrain)
Haiping
@Oceania2018
@CodeRabbit957 Can you provide UnitTest to reproduce the issue?
CodeRabbit957
@CodeRabbit957

@Oceania2018 I'm new to neural networks and tensorflow. I'm not sure what I would unit test.
Would this help?:

https://1drv.ms/f/s!AHAJVZtIv3lxfg

Stephan Vedder
@feliwir
Hey, i'm currently stuck with this: SciSharp/TensorFlow.NET#848
Is there any way i can create a Graph from a GraphDef instance?
The Import functions only work on "real" files
Stephan Vedder
@feliwir
And how can i fetch metadata like this in TensorFlow.NET: https://github.com/mozilla/DeepSpeech/blob/master/native_client/tfmodelstate.cc#L101
hjh1649
@hjh1649
Can TensorFlow.NET be used in Unity3D and MobileDevices(android & iOS)'s environment?
Ghost
@ghost~6144c3e26da037398485ee7b
@BrendanMulcahy I saw your conversation from 2019 while I was searching for ML-Agents example usages outside Unity (I'm trying to make it work with MG). I was wondering what you were able to do up until now. (also any recommendations/advice would be nice :))