WLJS LogoWLJS Notebook

NetDrop

NetDrop[chain, n] removes the first n layers from a NetChain.

  • NetDrop[chain, -n] removes the last n layers from a NetChain.
  • NetDrop[chain, {start, end}] drops the layers between start and end in a NetChain.

Examples

net = NetChain[{LinearLayer[], Ramp, LinearLayer[], Ramp}];
NetDrop[net, 2]

Please visit the official Wolfram Language Reference for more details.

On this page