---------------------------------------------------------------------------
Py4JJavaError Traceback (most recent call last)
<ipython-input-6-92e2048e4b4a> in <module>()
2 import systemml as sml
3 trained_vgg_weights = 'trained_vgg_weights'
----> 4 sml.convert_caffemodel(sc, 'VGG_ILSVRC_19_layers_deploy.proto', 'VGG_ILSVRC_19_layers.caffemodel', trained_vgg_weights)
5 urllib.request.urlretrieve('https://raw.githubusercontent.com/niketanpansare/systemml/deconv/scripts/nn/examples/caffe2dml/models/imagenet/labels.txt', os.path.join(trained_vgg_weights, 'labels.txt'))
/Users/asurve/.pyenv/versions/3.5.0/lib/python3.5/site-packages/systemml/converters.py in convert_caffemodel(sc, deploy_file, caffemodel_file, output_dir, format, is_caffe_installed)
103 createJavaObject(sc, 'dummy')
104 utilObj = sc._jvm.org.apache.sysml.api.dl.Utils()
--> 105 utilObj.saveCaffeModelFile(sc._jsc, deploy_file, caffemodel_file, output_dir, format)
106
107
/Users/asurve/Documents/Docs/SystemML/Spark/downloads/spark-2.0.2-bin-hadoop2.7/python/lib/py4j-0.10.3-src.zip/py4j/java_gateway.py in __call__(self, *args)
1131 answer = self.gateway_client.send_command(command)
1132 return_value = get_return_value(
-> 1133 answer, self.gateway_client, self.target_id, self.name)
1134
1135 for temp_arg in temp_args:
/Users/asurve/Documents/Docs/SystemML/Spark/downloads/spark-2.0.2-bin-hadoop2.7/python/pyspark/sql/utils.py in deco(*a, **kw)
61 def deco(*a, **kw):
62 try:
---> 63 return f(*a, **kw)
64 except py4j.protocol.Py4JJavaError as e:
65 s = e.java_exception.toString()
/Users/asurve/Documents/Docs/SystemML/Spark/downloads/spark-2.0.2-bin-hadoop2.7/python/lib/py4j-0.10.3-src.zip/py4j/protocol.py in get_return_value(answer, gateway_client, target_id, name)
317 raise Py4JJavaError(
318 "An error occurred while calling {0}{1}{2}.\n".
--> 319 format(target_id, ".", name), value)
320 else:
321 raise Py4JError(
Py4JJavaError: An error occurred while calling o54.saveCaffeModelFile.
: java.lang.OutOfMemoryError: Java heap space
at org.apache.sysml.runtime.matrix.data.MatrixBlock.allocateDenseBlock(MatrixBlock.java:362)
at org.apache.sysml.runtime.matrix.data.MatrixBlock.allocateDenseBlock(MatrixBlock.java:336)
at org.apache.sysml.api.dl.Utils$.allocateMatrixBlock(Utils.scala:140)
at org.apache.sysml.api.dl.Utils$$anonfun$readCaffeNet$1.apply(Utils.scala:218)
at org.apache.sysml.api.dl.Utils$$anonfun$readCaffeNet$1.apply(Utils.scala:189)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at org.apache.sysml.api.dl.Utils$.readCaffeNet(Utils.scala:189)
at org.apache.sysml.api.dl.Utils$.saveCaffeModelFile(Utils.scala:162)
at org.apache.sysml.api.dl.Utils$.saveCaffeModelFile(Utils.scala:157)
at org.apache.sysml.api.dl.Utils.saveCaffeModelFile(Utils.scala:298)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:237)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:280)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:214)
at java.lang.Thread.run(Thread.java:745)