Skip to content

Commit 5c24f1a

Browse files
fix documentation of sits_train and torch models
1 parent 7a6b404 commit 5c24f1a

7 files changed

Lines changed: 3 additions & 9 deletions

File tree

‎R/sits_lighttae.R‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ sits_lighttae <- function(samples = NULL,
278278
# by .ml_normalize.torch_model function
279279
}
280280
)
281-
# torch 12.0 with luz not working with Apple MPS
281+
# verify if GPU is available
282282
cpu_train <- .torch_cpu_train()
283283
# Train the model using luz
284284
torch_model <-
@@ -331,7 +331,6 @@ sits_lighttae <- function(samples = NULL,
331331
# Verifies if torch package is installed
332332
.check_require_packages("torch")
333333
# Set torch threads to 1
334-
# Note: function does not work on MacOS
335334
suppressWarnings(torch::torch_set_num_threads(1L))
336335
# Unserialize model
337336
torch_model[["model"]] <- .torch_unserialize_model(serialized_model)

‎R/sits_lstm_fcn.R‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ sits_lstm_fcn <- function(samples = NULL,
310310
# Verifies if torch package is installed
311311
.check_require_packages("torch")
312312
# Set torch threads to 1
313-
# Note: function does not work on MacOS
314313
suppressWarnings(torch::torch_set_num_threads(1L))
315314
# Unserialize model
316315
torch_model[["model"]] <- .torch_unserialize_model(serialized_model)

‎R/sits_mlp.R‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ sits_mlp <- function(samples = NULL,
262262
# Verifies if torch package is installed
263263
.check_require_packages("torch")
264264
# Set torch threads to 1
265-
# Note: function does not work on MacOS
266265
suppressWarnings(torch::torch_set_num_threads(1L))
267266
# Unserialize model
268267
torch_model[["model"]] <- .torch_unserialize_model(serialized_model)

‎R/sits_resnet.R‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ sits_resnet <- function(samples = NULL,
338338
# Verifies if torch package is installed
339339
.check_require_packages("torch")
340340
# Set torch threads to 1
341-
# Note: function does not work on MacOS
342341
suppressWarnings(torch::torch_set_num_threads(1L))
343342
# Unserialize model
344343
torch_model[["model"]] <- .torch_unserialize_model(serialized_model)

‎R/sits_tae.R‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ sits_tae <- function(samples = NULL,
240240
# softmax is done after classification - removed from here
241241
}
242242
)
243-
# torch 12.0 not working with Apple MPS
243+
# train with CPU or GPU?
244244
cpu_train <- .torch_cpu_train()
245245
# train the model using luz
246246
torch_model <-
@@ -287,7 +287,6 @@ sits_tae <- function(samples = NULL,
287287
# Verifies if torch package is installed
288288
.check_require_packages("torch")
289289
# Set torch threads to 1
290-
# Note: function does not work on MacOS
291290
suppressWarnings(torch::torch_set_num_threads(1L))
292291
# Unserialize model
293292
torch_model[["model"]] <- .torch_unserialize_model(serialized_model)

‎R/sits_tempcnn.R‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ sits_tempcnn <- function(samples = NULL,
325325
# Verifies if torch package is installed
326326
.check_require_packages("torch")
327327
# Set torch threads to 1
328-
# Note: function does not work on MacOS
329328
suppressWarnings(torch::torch_set_num_threads(1L))
330329
# Unserialize model
331330
torch_model[["model"]] <- .torch_unserialize_model(serialized_model)

‎R/sits_train.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' @author Gilberto Camara, \email{gilberto.camara@@inpe.br}
66
#' @author Alexandre Ywata de Carvalho, \email{alexandre.ywata@@ipea.gov.br}
77
#'
8-
#' @description Given a tibble with a set of distance measures,
8+
#' @description Given a tibble with a set of time series,
99
#' returns trained models. Currently, sits supports the following models:
1010
#' \itemize{
1111
#' \item{support vector machines: \code{\link[sits]{sits_svm}};}

0 commit comments

Comments
 (0)