title: what is Pytorch's add_module()?
body: <p>I stumbled upon the method <code>add_module()</code> in a Pytorch model.</p>
  <p><a href="http://model%20=%20Sequential()%20model.add(Conv1D(filters=64,%20kernel_size=3,%20activation=%27relu%27,%20input_shape=(n_timesteps,n_features)))%20model.add(Conv1D(filters=64,%20kernel_size=3,%20activation=%27relu%27))%20model.add(Dropout(0.5))%20model.add(MaxPooling1D(pool_size=2))%20model.add(Flatten())%20model.add(Dense(100,%20activation=%27relu%27))%20model.add(Dense(n_outputs,%20activation=%27softmax%27))%20model.compile(loss=%27categorical_crossentropy%27,%20optimizer=%27adam%27,%20metrics=%5B%27accuracy%27%5D)" rel="nofollow noreferrer">The doc</a> only states</p>
  <blockquote>
  <p>Adds a child module to the current module.</p>
  <p>The module can be accessed as an attribute using the given name.</p>
  </blockquote>
  <p>I don't understand what &quot;adding a child module&quot; means.</p>
  <p>How is it different from just setting a pointer to the other module using <code>self._other module = other_module</code>?</p>
  <p>What are the nuances?</p>