Access subnetworks of a network

# S3 method for ruta_network
[(net, index)

Arguments

net

A "ruta_network" object

index

An integer vector of indices of layers to be extracted

Value

A "ruta_network" object containing the specified layers.

Examples

(input() + dense(30))[2]
#> Network structure:
#>  dense(30 units) - linear
long <- input() + dense(1000) + dense(100) + dense(1000) + output()
short <- long[c(1, 3, 5)]