<p dir="auto">The <code class="notranslate">self.in_channels</code> in <a href="https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/conv.py#L34">nn.Conv</a> and <code class="notranslate">self.in_features</code> in <a href="https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/linear.py#L70">nn.Linear</a> are representing the same kind of param, so I suggest to use same name, for example <code class="notranslate">self.in_channels</code>. This is also do for other same situation.</p>
<p dir="auto">Thanks!</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ssnl/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ssnl">@ssnl</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a></p>
<p dir="auto">Linear layers accept <code class="notranslate">in_features</code> and <code class="notranslate">out_features</code> arguments, and save them as similarly named instance variables. Similar arguments for Conv1d/Conv2d/Conv3d layers are called <code class="notranslate">in_channels</code> and <code class="notranslate">out_channels</code>. I think its worth to standardize on one set of names.</p>