hey just wondering, if I would want to run a NN on the gpu in Unity would i do it in a shader?
Would it be a good idea to train a NN on water physics?
the idea is roughly to train it with data from simulations made in Maya or Blender (or more specialised software for simulation), inputs would be the parameters from the simulation and the output would be measured against the verts magnitude, velocity and position from the simulation to calculate the delta error for back propagation.
the trained model would then be used in the vertex shader.
I wonder if this would be a faster than calculating the physics for each vert, especially for a wide range of complex behaviours.
Anyone tried something like this or sees the fail coming a mile away, please let me know.
There’s a tech conference called GTC, or GPU Technology Conference … or as one graphics programmer is quoted “the G stands for Deep Neural Nets”. Training neural networks with GPUs (generally using compute shaders, or OpenCL), and then applying the results with “normal” shader has been a hot topic for the last 3 years or so, so yes, it’s possible.
Compute Shaders are used for this sort of thing. You talk to the GPU via Compute Shader, give it lots of data, it grinds through it and gives back results in a stupendously orderly fashion.
Making the GPU do non-GPU tasks is a real thing in the industry. Not as much for gaming, but for fields that have huge volumes of data to mull through. There’s really a big shortage of public info on it. There’s information out there like on the NVIDIA site but otherwise it’s tough to find good stuff.
A compute shader would make sense here, but you could just use some regular shaders with floating point render textures. I haven’t tried it myself yet, though AI was my major. The calculations can be done fairly parallel, so it should work fine.