You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Sebastian Baunsgaard (Jira)" <ji...@apache.org> on 2020/06/11 08:07:00 UTC

[jira] [Closed] (SYSTEMML-2532) NameError: name 'keras' is not defined

     [ https://issues.apache.org/jira/browse/SYSTEMML-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Baunsgaard closed SYSTEMML-2532.
------------------------------------------
    Fix Version/s: SystemDS 2.0
       Resolution: Not A Bug

Did you install Keras before trying to execute it, or maybe the import is missing?

That said SystemDS now does not support this functionality anymore, since we moved to Onnx for imports of models. Therefore i mark this as Not a Bug, and will open a new task for making a tutorial for importing a model for keras.


> NameError: name 'keras' is not defined
> --------------------------------------
>
>                 Key: SYSTEMML-2532
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-2532
>             Project: SystemDS
>          Issue Type: Bug
>            Reporter: khaled almgren
>            Priority: Major
>             Fix For: SystemDS 2.0
>
>
> Dear, 
> I tried to use systeml to run a keras model as follows:
> ....
> model.compile(optimizer= adam,
>  loss = 'binary_crossentropy',
> keras.summary()
>  
> import systemml as sml
> import keras
> from systemml.mllearn import Keras2DML
> from systemml import MLContext, dml, dmlFromResource, dmlFromFile, dmlFromUrl
> sysml_model = Keras2DML(spark, model,input_shape=count)
> sysml_model.fit(X_train, y_train)
> sysml_model.score(X_test, y_test)
>  
> However, it shows an error when running:
> sysml_model = Keras2DML(spark, model,input_shape=count)
> in estimators. py:
> in __init__(self, sparkSession, keras_model, input_shape, transferUsingDF, load_keras_weights, weights, labels, batch_size, max_iter, test_iter, test_interval, display, lr_policy, weight_decay, regularization_type)
> NameError: name 'keras' is not defined



--
This message was sent by Atlassian Jira
(v8.3.4#803005)