Comments (4)
I think you can get the model using clf.load_searcher().load_best_model()
from autokeras.
Thank @paindefender for the help.
@ankapale
Please add a function of export keras_model() to the ImageClassifier
by clf.load_searcher().load_best_model().produce_keras_model() here.
https://github.com/jhfjhfj1/autokeras/blob/master/autokeras/graph.py#L542
Thanks.
We also need to find a way to export our own model instead of the Keras model.
I will open an issue on that.
from autokeras.
Can you look to export using onnx standard?
So models are interoperable and deployable to production environments.
from autokeras.
#Replicating the save-file code from commit a3ca627 :
from autokeras import ImageClassifier
clf = ImageClassifier(verbose=True, augment=False)
clf.load_searcher().load_best_model().produce_keras_model().save('test_save.h5')
This appears successful. Returns null, but a new 7.3MB file 'test_save.h5' is generated from /tmp/autokeras/12.h5 which was originally 7.0MB.
Using Keras to plot the newly-saved model:
from keras.models import load_model
model = load_model('test_save.h5')
from keras.utils import plot_model
plot_model(model, to_file='model.png')
The result of this is successful, the architecture is plotted to an image.
Can also output just the architecture:
from autokeras import ImageClassifier
clf = ImageClassifier(verbose=True, augment=False)
clf.load_searcher().load_best_model().produce_keras_model().to_json()
from autokeras.
Related Issues (20)
- Over a year later and I'm also getting this issue. Seems oddly sudden because it was working previously but the suggested fix above isn't working for me. Any update on this issue or what is causing it?
- Bug: Link in `TimeSeriesForecaster` tutorial leads to 404 HOT 1
- Refactor AutoKeras to support use preprocessor and model layers within the same block
- Cannot Set Learning Rate and Optimizer but Have to Tune
- Import-level bug: cannot import name 'utils' from 'autokeras.utils HOT 1
- Bug: ValueError: The dataset should at least contain 2 batches to be split. HOT 2
- Feature: image_dataset_from_directory support one_hot/categorical labels
- Bug: StructuredDataClassifier ignores loss parameter
- using autokeras to build a sequence prediction model
- Can the models not be saved during the trial?
- problem: Higher number of epochs lead to worse results? HOT 1
- Bug: Error "I tensorflow/core/common_runtime/executor.cc:1197] [/device:CPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): INVALID_ARGUMENT: You must feed a value for placeholder tensor 'Placeholder/_15' with dtype double and shape"
- Feature: Any GPU optimization features?
- Bug: KeyError: 'text_block_1/max_tokens' HOT 5
- Feature: Model Agnostic Explanability - Permutation Importance and Counterfactual
- Bug: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 205. in Chinese path, not in English path
- Bug: TypeError: can only concatenate str (not "NoneType") to st HOT 1
- Bug: Unable to predict data using the model trained (Node: 'model/multi_category_encoding/string_lookup_22/None_Lookup/LookupTableFindV2' Table not initialized. [[{{node model/multi_category_encoding/string_lookup_22/None_Lookup/LookupTableFindV2}}]] [Op:__inference_predict_function_10129638] )
- Bug: HOT 4
- AttributeError: module 'numpy' has no attribute 'object' when using autokeras with structured data HOT 4
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 autokeras.