Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 27 21:52
    C0nflict starred SciSharp/Numpy.NET
  • Jan 27 17:13
    LarryThermo commented #390
  • Jan 27 15:41
    henon closed #17
  • Jan 27 15:40
    henon commented #25
  • Jan 27 00:22

    Oceania2018 on master

    NumSharp project (compare)

  • Jan 27 00:19

    Oceania2018 on master

    Update index.rst Spelling and … Merge pull request #55 from sam… (compare)

  • Jan 27 00:19
    Oceania2018 closed #55
  • Jan 27 00:19
    Oceania2018 review_requested #55
  • Jan 27 00:18

    Oceania2018 on master

    Tensorflow Hub (compare)

  • Jan 26 22:56
    samboustani opened #55
  • Jan 26 22:46
    deepakkumar1984 commented #87
  • Jan 26 22:43
  • Jan 26 21:39

    Oceania2018 on compact

    support greater and less for sa… (compare)

  • Jan 26 21:39
    Oceania2018 closed #393
  • Jan 26 21:39
    Oceania2018 opened #393
  • Jan 26 21:38

    Oceania2018 on compact

    Logical (#392) * logical_and, … (compare)

  • Jan 26 21:38
    Oceania2018 closed #392
  • Jan 26 21:38
    Oceania2018 opened #392
  • Jan 26 21:38

    Oceania2018 on compact

    mask setter add MaskSetter2D test only work for 1d mask. (compare)

  • Jan 26 21:38
    Oceania2018 closed #391
Meinrad Recheis
@henon
However, I don't get the example from the quickstart:
// Allocate a writeable buffer on the GPU, with the contents of the array
using ReadWriteBuffer<float> buffer = Gpu.Default.AllocateReadWriteBuffer<float>(1000);

// Run the shader
Gpu.Default.For(1000, id => buffer[id.X] = id.X);

// Get the data back
float[] array = buffer.GetData();
what is id and why does it have an X property? is it a point in an ND space?
Haiping Chen
@Oceania2018
id is range of 0 - 999
Meinrad Recheis
@henon

id is range of 0 - 999

I thought so too but why id.X

Haiping Chen
@Oceania2018
@Sergio0694 I need take a sit and research your project. Apparently, it's an awesome job. @Nucs NumSharp performance optimization related.
Meinrad Recheis
@henon
oh, I see now. you can compute with up to three-dimensional values
Sergio Pedri
@Sergio0694
@henon That's how GPU kernels work in both DX12 and CUDA.
Basically, you can dispatch a kernel on a given range, up to 3D.
The kernel takes as input that ThreadIds value that contains the current index along the 3 axis.
It's basically as if you had an i, j and k tuple of indices for 3 nested loops
Of course, if you only iterate on one axis, you can ignore the last two, etc.
This implements a fully connected forward layer
You can see I'm dispatching the kernel on 3 axes, and the kernel itself only has a single for loop, which just computes the result value for a single target element
Eli Belash
@Nucs
Overall impressive work, making it truely quite easy to support fairly complex functions.
Any support for ops similar to what System.Math provides? (e.g. gpu's sin)
Sergio Pedri
@Sergio0694
And there the 3 indices would be: id.X the sample index, id.Y the i index on each matrix, for an input sample, and id.Z the j index
@Oceania2018 That's great to hear, thanks! Let me know what you think when you take a look at it! 😄
@Nucs Thanks! And yes, you can use many of the methods in both Math and MathF (eg. Math.Pow), and they get automatically mapped to HLSL functions
Meinrad Recheis
@henon
ok, it makes perfect sense now
Eli Belash
@Nucs
Great
Sergio Pedri
@Sergio0694
I'm also trying to publish this as a NuGet package but I've been trying for 4 days now to get that to work with no success
Eli Belash
@Nucs
how do you handle graphics cards's compute capabilities? Or is it handled by the directx library?
Sergio Pedri
@Sergio0694
Eli Belash
@Nucs
Yeah, I'll dm you
Sergio Pedri
@Sergio0694
@Nucs Thanks!
As for the GPU capabilities, I query the available devices that support DX12.1, and use the first one by default.
The Gpu class also exposes all the available GPUs, so you can specifically target one in your system (or more)
Eg. if you wanted to use your secondary GPU, for instance
Meinrad Recheis
@henon
@Sergio0694 : I only flew over it, how about embedding the resources you need in the assembly? is that not an option?
Haiping Chen
@Oceania2018
@Sergio0694 Are you going to use computesharp to improve your neural network project?
Sergio Pedri
@Sergio0694
@henon Yeah that's my backup plan, if I can't get this to work in a while I might just move the template in a class, with the text as a constant string, and use that for now, and eventually move back to the file in the future if I can figure it out
@Oceania2018 Not right now as I'm pretty busy with university, but yeah I've thought about it.
That should give it a pretty nice performance boost , especially if I make it GPU-only so that I can keep the memory just on the GPU most of the time, and avoid havign to copy it back and forth on the CPU
Sergio Pedri
@Sergio0694
Alright, so thanks to @henon the template issue has now been fixed. Now I just need to wait for the DotNetDxc package to be updated with the new .dll files, and I'll be able to publish ComputeSharp to NuGet 👍
Brendan Mulcahy
@BrendanMulcahy
@Oceania2018 @moloneymb Thanks! I agree with Matthew btw, someone could learn from my code but it's something I'm just hacking together while trying to follow this python book. There are some cases where the book is not perfect, maybe the second edition has fixes? Would love feedback btw if you have free time to submit a PR :)! I'm going to keep working on the code.
I made you guys a video of a game/machine learning project that I have been working on for about a year in my free time: https://youtu.be/5kCkAW5gHEc I'm hoping to port it to TensorFlow.NET from TensorFlowSharp. Let me know what you think!
Matthew Moloney
@moloneymb
@BrendanMulcahy Looks good. I've thought about building similar games around Deep Learning. I was considering doing it in C++/OpenGL/OpenCV/Webasm.
Brendan Mulcahy
@BrendanMulcahy
I'm not much of a C++ programmer. I have tinkering around with a lot of languages but I can mainly only "do work" in C# and python
If there is anyway I can help you guys out more directly let me know. I tend to work/learn best when I'm on a mission of sorts so I can probably give the most helpful feedback if Im working on this game and using Tensorflow.NET
But I can try to lend help in other ways when I get stuck/bored and need something to switch onto for a bit
BTW, I've never really work on an open-source project, so I dont 100% know the etiquette so I might need some help with that as well (I'm open to critical feedback btw so don't feel like you need to hold anything back)
Meinrad Recheis
@henon
@BrendanMulcahy you are welcome to join our team if you like. don't worry, we are a friendly group of developers who are passionate about ML and you'll quickly get the hang of it. even if you only take on only a small task it would help and be very much appreciated
Brendan Mulcahy
@BrendanMulcahy
@henon Im free for most of today, anything I can tackle in about a day of work?
Meinrad Recheis
@henon
I guess the best way to build up knowledge about TF.NET which you need for most tasks is to port your game to it
Brendan Mulcahy
@BrendanMulcahy
I'm going to keep working through the book "Hands-On Machine Learning...". I'm working on a neural network right now (btw, my game uses Keras actually on top of Miguel's tensorflowsharp, so I can checkout Keras.NET too)
Meinrad Recheis
@henon
by the way, check out the examples we have
Brendan Mulcahy
@BrendanMulcahy
Yeah I check them out whenever I run into trouble :)
Meinrad Recheis
@henon
if you happen to build one that would complement our examples you might want to add it
Brendan Mulcahy
@BrendanMulcahy
BTW, the examples in the readthedocs are all super outdated
Last I checked earlier this week. I could try fixing the read the docs
Is that managed in github somehow
Meinrad Recheis
@henon
I guess it is, @Oceania2018 would know
Haiping Chen
@Oceania2018
@BrendanMulcahy Just fork repo, all the docs is in the docs folder.
Brendan Mulcahy
@BrendanMulcahy
Cool, thanks!
Haiping Chen
@Oceania2018
I’m doing the TensorFlow 2.0 in my local. But no eager mode for the first stage.