Comments (3)
I was catching up on the CNN visualization notebooks today. There's two ways to resolve this:
- Using TF 2.0
GradientTape
as in here. - Disabling eager execution at the top of the script with
tf$compat$v1$disable_eager_execution()
.
Neither of them have side effects on the rest of the notebook code chunks so I'll probably just use tf$compat$v1$disable_eager_execution()
.
from dl-keras-tf.
Good catch @OmaymaS. That is a notebook that I haven't really done anything with. I grabbed it from JJ Allaire's book repo but planned to revise it and base it on the Cats vs. Dogs model. When I do the revision I will try work out this issue.
from dl-keras-tf.
I was catching up on the CNN visualization notebooks today. There's two ways to resolve this:
- Using TF 2.0
GradientTape
as in here.- Disabling eager execution at the top of the script with
tf$compat$v1$disable_eager_execution()
.
Neither of them have side effects on the rest of the notebook code chunks so I'll probably just use
tf$compat$v1$disable_eager_execution()
.
Doing tihs also results in an error (I'm also following the cats vs dogs example on "Visualizing convnet filters"):
Error in py_call_impl()
:
! TypeError: You are passing KerasTensor(type_spec=TensorSpec(shape=(), dtype=tf.float32, name=None), name='tf.math.reduce_mean/Mean:0', description="created by layer 'tf.math.reduce_mean'"), an intermediate Keras symbolic input/output, to a TF API that does not allow registering custom dispatchers, such as `tf.cond`, `tf.function`, gradient tapes, or `tf.map_fn`. Keras Functional model construction only supports TF API calls that *do* support dispatching, such as `tf.math.add` or `tf.reshape`. Other APIs cannot be called directly on symbolic Kerasinputs/outputs. You can work around this limitation by putting the operation in a custom Keras layer `call` and calling that layer on this symbolic input/output.
from dl-keras-tf.
Related Issues (11)
- Error running code cnn-train code chunk in 02-cats-vs-dogs.Rmd HOT 4
- What is the interpretation of similar words based on embeddings? HOT 1
- Embedded Models HOT 1
- `docs/data/non-imdb-movie-reviews` does not exist?! HOT 1
- A note regarding Kaggle API installation HOT 1
- Possible issue after the first installation of keras and python
- Finishing touches checklist
- What about class imbalance in training data? HOT 2
- [Curiosity] Extending word2vec to sequences with a timestamp HOT 1
- train/valid loss = NAN when loss = "mean_squared_error" due to exploding values HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dl-keras-tf.