question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use Keras.backend in TensorflowJS ?

See original GitHub issue

The below code snippet is written in python Keras.

from keras import backend as K
...

layer_name ='Mask'
NewInput = model.get_layer(layer_name).output
visualization = K.function([model.input], [NewInput])
...

I want to write this code in Tensorflow.JS … I am unable to find the right lines in TensorflowJS for this code snippet.

Can anyone help ?!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
jackfrost1411commented, Mar 23, 2021

There some of the concept of backend in the tfjs-core package, what is the particular thing you want to do on the keras backend package?

I have trained a model Keras that ends with a softmax layer. But I want to get output from an intermediate Convolution layer. How can I do this?

0reactions
google-ml-butler[bot]commented, Apr 8, 2021

Are you satisfied with the resolution of your issue? Yes No

Read more comments on GitHub >

github_iconTop Results From Across the Web

TensorFlow.js layers API for Keras users
Currently, in Keras, the call method can only operate on (Python) TensorFlow's tf.Tensor objects (assuming TensorFlow backend), which are ...
Read more >
How to use Keras.backend in TensorflowJS? - Stack Overflow
from keras import backend as K layer_name ='Mask' NewInput = model.get_layer(layer_name).output visualization = K.function([model.input], ...
Read more >
Importing a Keras model into TensorFlow.js - Medium
Model is trained in google colab and deployed using tensorflow.js ... Imports. Model contains keras layers with tensorflow backend.
Read more >
Home - Keras.js Documentation
Run Keras models in the browser, with GPU support using WebGL ... as backends, the models can be trained in any backend, including...
Read more >
Keras as a simplified interface to TensorFlow: tutorial
Session() from keras import backend as K K.set_session(sess) ... We can then use Keras layers to speed up the model definition process:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found