Skip to content

Weird error with Ubuntu 18.04 install #12

@nateGeorge

Description

@nateGeorge

I'm getting a strange error when installing on Ubuntu 18.04. First, I installed R 3.5 following these instructions. Then I installed r-cran-devtools (sudo apt install r-cran-devtools). Then I installed deepviz with devtools::install_github("andrie/deepviz"). Finally, I tried to run an example:

library(deepviz)
library(magrittr)
require(keras)

model <- keras_model_sequential() %>%
  layer_dense(10, input_shape = 4) %>%
  layer_dense(2, activation = "sigmoid")

model %>% plot_model()

but it gave this error:

Error in data.frame(id = 1:n, type = type, label = label, stringsAsFactors = FALSE) : 
  arguments imply differing number of rows: 2, 0

The traceback() looks like this:

17: stop(gettextf("arguments imply differing number of rows: %s", 
        paste(unique(nrows), collapse = ", ")), domain = NA)
16: data.frame(id = 1:n, type = type, label = label, stringsAsFactors = FALSE)
15: dots_values(...)
14: flatten_bindable(dots_values(...))
13: dplyr::bind_cols(data.frame(id = 1:n, type = type, label = label, 
        stringsAsFactors = FALSE), extras)
12: create_node_df(n = length(model_layers), name = l_name, type = l_type, 
        label = glue::glue("{l_name}\n{l_type}\n{l_activation}"), 
        shape = "rectangle", activation = l_activation)
11: model_nodes(model)
10: plot_model.keras.engine.training.Model(.)
9: plot_model(.)
8: function_list[[k]](value)
7: withVisible(function_list[[k]](value))
6: freduce(value, `_function_list`)
5: `_fseq`(`_lhs`)
4: eval(quote(`_fseq`(`_lhs`)), env, env)
3: eval(quote(`_fseq`(`_lhs`)), env, env)
2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
1: model %>% plot_model()

So it appears to be happening on this line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions