-2
float w_, b_;

Neuron()
    : w_(2.0), b_(1.0)
{}

I dont quite understand what this means or how it works. I do get what its doing in a very vague way (seems to set variables w and b) but why and when should I use this? also why are the brackets under the data and what exactly does the : (colon) mean?

for some clarification here is the video I saw it in:

How to Build a single Neuron in C++

I'm trying to learn how to build a neural network so if any of you know any good in depth documentation on how it works please link it below as well.

  • 2
    this has nothing to do with neural networks. This is just basic C++ syntax. It seems to me that the resource you are following assumes basic C++ knowledge. If that is the case I suggest either: 1. you find a resource that teaches neural networks but also assumes no C++ knowledge and explains the C++ basics along the way or 2. get the time to learn and be comfortable in C++ first then come back to neural networks in C++ or 3. choose a language you know or is easier to learn. – bolov May 24 '22 at 01:55
  • @bolov i didn't assume it had anything to do with neural networks i simply stated where i saw it for the first time. Hadn't seen it before and was just curious. but yes you are correct i do need to learn more before i dive into neural nets, but me diving into topics like this helps me find things i've never seen before such as this. You are correct though i should look for better resources! In the meantime thats what stackoverflow is for!! – Chunky Panda May 31 '22 at 23:23

0 Answers0