replace_head: Replace the head of a network Replaces the head of the...

View source: R/utils.R

replace_headR Documentation

Replace the head of a network Replaces the head of the network with a linear layer with d_out classes.

Description

Replace the head of a network Replaces the head of the network with a linear layer with d_out classes.

Usage

replace_head(network, d_out)

Arguments

network

(torch::nn_module)
The network

d_out

(integer(1))
The number of output classes.


mlr3torch documentation built on April 4, 2025, 3:03 a.m.