{"action":"opened","issue":{"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5301","repository_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j","labels_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5301/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5301/comments","events_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5301/events","html_url":"https://github.com/deeplearning4j/deeplearning4j/issues/5301","id":325574735,"number":5301,"title":"Not able to import Keras model into DL4J - HDF5-DIAG: Error detected in HDF5","user":{"login":"rahul-raj","id":517415,"avatar_url":"https://avatars3.githubusercontent.com/u/517415?v=4","gravatar_id":"","url":"https://api.github.com/users/rahul-raj","html_url":"https://github.com/rahul-raj","followers_url":"https://api.github.com/users/rahul-raj/followers","following_url":"https://api.github.com/users/rahul-raj/following{/other_user}","gists_url":"https://api.github.com/users/rahul-raj/gists{/gist_id}","starred_url":"https://api.github.com/users/rahul-raj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahul-raj/subscriptions","organizations_url":"https://api.github.com/users/rahul-raj/orgs","repos_url":"https://api.github.com/users/rahul-raj/repos","events_url":"https://api.github.com/users/rahul-raj/events{/privacy}","received_events_url":"https://api.github.com/users/rahul-raj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-23T07:07:00Z","updated_at":"2018-05-23T07:07:00Z","closed_at":null,"author_association":"NONE","body":"Here is the code block that performs keras import:\r\n```\r\nMultiLayerNetwork multiLayerNetwork = KerasModelImport\r\n                .importKerasSequentialModelAndWeights(\"C:/Users/Rahul/Downloads/Artificial_Neural_Networks/Artificial_Neural_Networks/ANN/ann_model_json\",\r\n                        \"C:/Users/Rahul/Downloads/Artificial_Neural_Networks/Artificial_Neural_Networks/ANN/ann_model\");\r\n        Evaluation evaluation = new Evaluation(1);\r\n        INDArray output = multiLayerNetwork.output(testSet.getFeatureMatrix());\r\n        output = output.cond(new AbsValueGreaterThan(0.50));\r\n        evaluation.eval(testSet.getLabels(),output);\r\n        System.out.println(\"args = [\" + evaluation.stats() + \"]\");\r\n```\r\n\r\nAnd I get this exception on console when I run it:\r\n```\r\nHDF5-DIAG: Error detected in HDF5 (1.10.1) thread 0:\r\n  #000: C:\\autotest\\hdf5110-StdRelease-code-10vs14\\build\\hdfsrc\\src\\H5G.c line 472 in H5Gopen2(): unable to open group\r\n    major: Symbol table\r\n    minor: Can't open object\r\n  #001: C:\\autotest\\hdf5110-StdRelease-code-10vs14\\build\\hdfsrc\\src\\H5Gint.c line 287 in H5G__open_name(): group not found\r\n    major: Symbol table\r\n    minor: Object not found\r\n  #002: C:\\autotest\\hdf5110-StdRelease-code-10vs14\\build\\hdfsrc\\src\\H5Gloc.c line 428 in H5G_loc_find(): can't find object\r\n    major: Symbol table\r\n    minor: Object not found\r\n  #003: C:\\autotest\\hdf5110-StdRelease-code-10vs14\\build\\hdfsrc\\src\\H5Gtraverse.c line 867 in H5G_traverse(): internal path traversal failed\r\n    major: Symbol table\r\n    minor: Object not found\r\n  #004: C:\\autotest\\hdf5110-StdRelease-code-10vs14\\build\\hdfsrc\\src\\H5Gtraverse.c line 639 in H5G_traverse_real(): traversal operator failed\r\n    major: Symbol table\r\n    minor: Callback failed\r\n  #005: C:\\autotest\\hdf5110-StdRelease-code-10vs14\\build\\hdfsrc\\src\\H5Gloc.c line 383 in H5G_loc_find_cb(): object 'model_weights' doesn't exist\r\n    major: Symbol table\r\n    minor: Object not found\r\nException in thread \"main\" java.lang.RuntimeException: Unknown exception.\r\n\tat org.bytedeco.javacpp.hdf5$H5Location.openGroup(Native Method)\r\n\tat org.deeplearning4j.nn.modelimport.keras.Hdf5Archive.openGroups(Hdf5Archive.java:72)\r\n\tat org.deeplearning4j.nn.modelimport.keras.Hdf5Archive.getGroups(Hdf5Archive.java:190)\r\n\tat org.deeplearning4j.nn.modelimport.keras.utils.KerasModelUtils.importWeights(KerasModelUtils.java:181)\r\n\tat org.deeplearning4j.nn.modelimport.keras.KerasSequentialModel.<init>(KerasSequentialModel.java:139)\r\n\tat org.deeplearning4j.nn.modelimport.keras.KerasSequentialModel.<init>(KerasSequentialModel.java:60)\r\n\tat org.deeplearning4j.nn.modelimport.keras.utils.KerasModelBuilder.buildSequential(KerasModelBuilder.java:147)\r\n\tat org.deeplearning4j.nn.modelimport.keras.KerasModelImport.importKerasSequentialModelAndWeights(KerasModelImport.java:271)\r\n\tat Test.main(Test.java:104)\r\n```\r\n\r\nI verified the directory in which keras models are present. Filing an issue since it seems like this issue as reported earlier ([https://github.com/deeplearning4j/deeplearning4j/issues/5029#issuecomment-387030566](https://github.com/deeplearning4j/deeplearning4j/issues/5029#issuecomment-387030566)) and was told to be resolved by beta version release.\r\n\r\nMy dl4j version is `1.0.0-beta` \r\n\r\n@maxpumperla, can you please have a look at it? Thank you!"}}
{"actor":{"display_login":"rahul-raj"}}