Skip to content

Commit 1ca1e12

Browse files
committed
incorrect 10 -> 100
1 parent 1f179c8 commit 1ca1e12

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

R/DataBackendLazy.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ DataBackendLazy = R6Class("DataBackendLazy",
182182
f(identical, backend$primary_key, self$primary_key, "primary key")
183183
f(test_permutation, backend$rownames, self$rownames, "row identifiers")
184184
f(test_permutation, backend$colnames, private$.colnames, "column names")
185-
browser()
186185
f(test_equal_col_info, col_info(backend), private$.col_info, "column information")
187186
# need to reverse the order for correct error message
188187
private$.backend = backend

R/TaskClassif_cifar.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ constructor_cifar100 = function(path) {
209209

210210
load_task_cifar100 = function(id = "cifar100") {
211211
cached_constructor = function(backend) {
212-
data = cached(constructor_cifar10, "datasets", "cifar100")$data
212+
data = cached(constructor_cifar100, "datasets", "cifar100")$data
213213

214214
cifar100_ds_generator = torch::dataset(
215215
initialize = function() {

data-raw/cifar.R

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ library(data.table)
55
library(torchvision)
66

77
# cached
8-
constructor_cifar10 = function(path) {
9-
require_namespaces("torchvision")
10-
11-
torchvision::cifar10_dataset(root = path, download = TRUE)
12-
13-
train_files = file.path(path, "cifar-10-batches-bin", sprintf("data_batch_%d.bin", 1:5))
14-
test_file = file.path(path, "cifar-10-batches-bin", "test_batch.bin")
15-
16-
# TODO: convert these to the meaningful names
17-
train_labels = unlist(map(train_files, read_cifar_labels_batch, type = 10))
18-
19-
data.table(
20-
class = factor(c(train_labels, rep(NA, times = 10000))),
21-
file = c(rep(train_files, each = 10000),
22-
rep(test_file, 10000)),
23-
idx_in_file = c(rep(1:10000, 5),
24-
1:10000),
25-
split = factor(rep(c("train", "test"), c(50000, 10000))),
26-
..row_id = seq_len(60000)
27-
)
28-
}
8+
# constructor_cifar10 = function(path) {
9+
# require_namespaces("torchvision")
10+
#
11+
# torchvision::cifar10_dataset(root = path, download = TRUE)
12+
#
13+
# train_files = file.path(path, "cifar-10-batches-bin", sprintf("data_batch_%d.bin", 1:5))
14+
# test_file = file.path(path, "cifar-10-batches-bin", "test_batch.bin")
15+
#
16+
# # TODO: convert these to the meaningful names
17+
# train_labels = unlist(map(train_files, read_cifar_labels_batch, type = 10))
18+
#
19+
# data.table(
20+
# class = factor(c(train_labels, rep(NA, times = 10000))),
21+
# file = c(rep(train_files, each = 10000),
22+
# rep(test_file, 10000)),
23+
# idx_in_file = c(rep(1:10000, 5),
24+
# 1:10000),
25+
# split = factor(rep(c("train", "test"), c(50000, 10000))),
26+
# ..row_id = seq_len(60000)
27+
# )
28+
# }
2929

3030
path <- here::here("cache")
3131

0 commit comments

Comments
 (0)