Diff of /man/reshape_input.Rd [000000] .. [409433]

Switch to unified view

a b/man/reshape_input.Rd
1
% Generated by roxygen2: do not edit by hand
2
% Please edit documentation in R/create_model_utils.R
3
\name{reshape_input}
4
\alias{reshape_input}
5
\title{Replace input layer}
6
\usage{
7
reshape_input(model, input_shape)
8
}
9
\arguments{
10
\item{model}{A keras model.}
11
12
\item{input_shape}{The new input shape vector (without batch size).}
13
}
14
\value{
15
A keras model with changed input shape of input model.
16
}
17
\description{
18
Replace first layer of model with new input layer of different shape. Only works for sequential models that
19
use CNN and LSTM layers.
20
}
21
\examples{
22
\dontshow{if (reticulate::py_module_available("tensorflow")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
23
model_1 <-  create_model_lstm_cnn(
24
  maxlen = 50,
25
  kernel_size = c(10, 10),
26
  filters = c(64, 128),
27
  pool_size = c(2, 2),
28
  layer_lstm = c(32),
29
  verbose = FALSE,
30
  layer_dense = c(64, 2))
31
model <- reshape_input(model_1, input_shape = c(120, 4))
32
model
33
\dontshow{\}) # examplesIf}
34
}