wget https://raw.githubusercontent.com/transcranial/keras-js/master/encoder.py - this link doesnt exist. can you help out.
Hi, nice article but i got one problem...
When I do your script, he told me :
Uncaught Error: [Model] path to protobuf-serialized model definition file is missing. at new t (keras.min.js:1) at window.onload ((index):115)
How can I solve the problem ? Thanks
That particular error shows up because the filenames
option of Model
from keras-js
got renamed to filename
. The path you provide there should point to a binary model file. I updated the article explaining how to produce the model file for the newest version keras-js
, and added a working project to our article materials repo.
I am new to keras.js. How exactly do I have to run it after having all the files and installing all the required?
The example here uses only a development Webpack config which creates a bundle that is injected into a HTML webpage dynamically. To get this to work on any website, you'd need to either adapt the Webpack config to create a production bundle that you would then load from your webpage, or you would load Keras.js separately and use the global KerasJS
object; see https://transcranial.github.io/keras-js-docs/setup/browser/.
I got one problem with that: I have found the following decision,
Project is running at http://localhost:3000/ webpack output is served from / Content not from webpack is served from /home/kidane/Documents/keras-weight-transfer/frontend/bundle 404s will fallback to /index.html Hash: 7e6e48eb9ec089832555
See comment https://my.remarkbox.com/r/b8a9d9ee-0008-11e9-b437-040140774501 which talks about the same thing.
Really nice article. But I facing one problem. I did everything as you have specified , but I got the following result.
webpack output is served from /
Content not from webpack is served from /home/kidane/Documents/keras-weight-transfer/frontend/build
404s will fallback to /index.html
It got stuck on loading with no content. I tried to change the folder where the server got reserved , but nothing change.
Would you help me please
I'm not 100% clear on what issue you're facing, but during development you can control the URL root and how links are displayed using the publicPath
and contentBase
keys of the devServer
property of the Webpack config. Try changing these until the project works with your setup. The details will generally depend on your particular setup, if it differs from the one supplied in the accompanying article materials.
when I use keras-js to build my project, I met a big problem, when I encoder hdf5 file, it raises KeyError: "Can't open attribute (can't locate attribute: 'model_config')", and when I use the latest version encoder to transfer my hdf5 file, I successfully get three files, but occurring another error :[Model] path to protobuf-serialized model definition file is missing. so now I have no idea how to continue my project.hopeful for your answer.
I noticed that you passed in a data sample that is basically a flattened 2D array. My model takes in 3D images as input, but I don't understand where I'm supposed to specify the height, width, channel specifications in my prediction function. Am I overthinking this or how do we enforce that constraint?
It's been a while, so I'm a little rusty, but based on the Usage page of the docs, your inputs should be objects of flattened arrays with keys corresponding to names of the input layers. The dimensions are specified in the model config, so you can check there for hints.
After saving the model as .h5 file and converting it to a .bin , I get following error while loading it:
Error: [Model] Model configuration does not contain any layers.
I have tried with different keras versions. What could be the problem? thanks