Git Product home page Git Product logo

Comments (4)

jonbry avatar jonbry commented on July 17, 2024

I noticed on the example code on keras.posit.com uses the |> pipe operator. I'm not sure if this is helpful, but when I switched to |> I get the following regex output:

data_augmentation <- keras_model_sequential() |>
  layer_random_flip("horizontal") |>
  layer_random_rotation(0.1) |>
  layer_random_zoom(0.2)
#> Error in layer_random_zoom(layer_random_rotation(layer_random_flip(keras_model_sequential(), : could not find function "layer_random_zoom"

Created on 2024-04-04 with reprex v2.1.0

The ValueError in console is the same.

As a side question: Is this the best repository to post these questions? I'm never sure where exactly to post issues that come up when working through the book. Should I be posting this in the keras repository?

from deep-learning-with-r-2nd-edition-code.

t-kalinowski avatar t-kalinowski commented on July 17, 2024

I think this is another manifestation of #10.

The example code works without issue if only keras3 is loaded, but breaks if both keras and keras3 are loaded. I'll aim to get a CRAN release of keras and keras3 out next week to fix this.

For now, I would recommend uninstalling 'keras'

remove.packages("keras")

and restarting the R session. If keras does end up accidentally loaded and you don't want to restart the session, you can temporarily "fix" the issue with this snippet:

assign(
  "class_filters", 
  reticulate:::.globals$class_filters[-length(reticulate:::.globals$class_filters)], 
  envir = reticulate:::.globals
)

from deep-learning-with-r-2nd-edition-code.

t-kalinowski avatar t-kalinowski commented on July 17, 2024

As a side question: Is this the best repository to post these questions?

Here or rstudio/keras are both fine! Thanks for reporting issues!

from deep-learning-with-r-2nd-edition-code.

jonbry avatar jonbry commented on July 17, 2024

For now, I would recommend uninstalling 'keras'

remove.packages("keras")

Thank you so much for getting back to me so quickly! This solved the issue. I didn't realize keras could cause issues without me loading it directly.

from deep-learning-with-r-2nd-edition-code.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.