Skip to main content

5 docs tagged with "initialization"

View all tags

Aggregate Initialization

Initialize arrays and simple structs using brace-enclosed lists without constructors. Concise syntax for multiple members.

Default Initialization

Object created without explicit initializer. Behavior depends on type and storage duration. Dangerous for fundamental types in local scope.

Uniform Initialization

C++11 brace initialization {} - one syntax for all types. Consistent, safe (prevents narrowing), solves gotchas.

Value Initialization

Explicitly request zero-initialization for fundamentals, default construction for classes. Safer than default initialization.

Weight Initialization

Before the first gradient is ever computed, a choice has already been made that decides whether training has any chance of working: how the weights start. Get it wrong and the signal either dies (shrinks to zero within a few layers) or explodes (grows without bound) before a single useful gradient update happens.