[
https://issues.apache.org/jira/browse/SYSTEMML-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17048467#comment-17048467
]
GANHONGNAN commented on SYSTEMML-2533:
--------------------------------------
Hello! This bug is caused by syntax error in example DML file```Hello! This bug
is caused by syntax error in example DML
file```systemml-master/scripts/nn/examples/mnist_lenet.dml```
You can get some hints from log "Non-existing named function argument 'pad' in
call to forward." That means there exists illegal function parameter. In
file```systemml-master/scripts/nn/examples/mnist_lenet.dml```you can find code
like this
```python[outp1, Houtp1, Woutp1] = max_pool2d::forward(outr1, F1, Houtc1,
Woutc1, Hf=2, Wf=2,strideh=2, stridew=2, pad=0, pad=0)```Considering DML syntax
being like python syntax, I infer that function parameter
```pythonpad=0```in that script is illegal. So I replace all 12 funciton
parameter
```pythonpad=0```with just ```0```in DML
script```systemml-master/scripts/nn/examples/mnist_lenet.dml```.
Then I rebuild the systemML. I run the same code
```scalaval clf = ml.nn.examples.Mnist_lenetval dummy =
clf.generate_dummy_data```from
"http://apache.github.io/systemml/spark-mlcontext-programming-guide" and got
same result as the tutorials tells.(I run this tutorials in spark-shell without
Zeppelin)
Following is the result
```scalascala> val dummy = clf.generate_dummy_dataSystemML Statistics:Total
execution time: 0.177 sec.Number of executed Spark inst: 0.
dummy:
org.apache.sysml.scripts.nn.examples.mnist_lenet.Generate_dummy_data_output =X
(Matrix): MatrixObject: scratch_space//_p45371_127.0.0.1//_t0/temp0_0, [1024 x
784, nnz=802816 (false), blocks (1000 x 1000)], binaryblock, dirtyY (Matrix):
MatrixObject: scratch_space//_p45371_127.0.0.1//_t0/temp4_4, [1024 x 10,
nnz=1024 (false), blocks (1000 x 1000)], binaryblock, dirtyC (long): 1Hin
(long): 28Win (long): 28```And I have ask for a pull request.
> Error in running MNIST LeNet algorithm
> --------------------------------------
>
> Key: SYSTEMML-2533
> URL: https://issues.apache.org/jira/browse/SYSTEMML-2533
> Project: SystemML
> Issue Type: Bug
> Environment: Zeppelin and spark-shell in ubuntu 18.04
> Reporter: Ebrahim
> Priority: Blocker
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Hi there,
> I am trying to execute the following code from
> [http://apache.github.io/systemml/spark-mlcontext-programming-guide]
>
> {{val clf = ml.nn.examples.Mnist_lenet}}
> {{val dummy = clf.generate_dummy_data}}
> {{.... }}
> {{}}
> I am getting this error in the second line when executing in Zeppelin and
> spark-shell :
>
> ----------------------
> org.apache.sysml.api.mlcontext.MLContextException: Exception when executing
> script
> at org.apache.sysml.api.mlcontext.MLContext.execute(MLContext.java:346)
> at org.apache.sysml.api.mlcontext.MLContext.execute(MLContext.java:319)
> at org.apache.sysml.api.mlcontext.Script.execute(Script.java:717)
> at
> org.apache.sysml.scripts.nn.examples.Mnist_lenet.generate_dummy_data(Mnist_lenet.java)
> ... 47 elided
> Caused by: org.apache.sysml.api.DMLException:
> org.apache.sysml.parser.LanguageException: Non-existing named function
> argument 'pad' in call to forward.
> at
> org.apache.sysml.api.ScriptExecutorUtils.compileRuntimeProgram(ScriptExecutorUtils.java:237)
> at
> org.apache.sysml.api.mlcontext.ScriptExecutor.compile(ScriptExecutor.java:195)
> at
> org.apache.sysml.api.mlcontext.ScriptExecutor.compile(ScriptExecutor.java:168)
> at
> org.apache.sysml.api.mlcontext.ScriptExecutor.execute(ScriptExecutor.java:234)
> at org.apache.sysml.api.mlcontext.MLContext.execute(MLContext.java:342)
> ... 50 more
> Caused by: org.apache.sysml.parser.LanguageException: Non-existing named
> function argument 'pad' in call to forward.
> at
> org.apache.sysml.parser.StatementBlock.rewriteFunctionCallStatements(StatementBlock.java:623)
> at org.apache.sysml.parser.StatementBlock.validate(StatementBlock.java:761)
> at
> org.apache.sysml.parser.ForStatementBlock.validate(ForStatementBlock.java:92)
> at
> org.apache.sysml.parser.FunctionStatementBlock.validate(FunctionStatementBlock.java:69)
> at
> org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:137)
> at
> org.apache.sysml.parser.DMLTranslator.validateParseTree(DMLTranslator.java:110)
> at
> org.apache.sysml.api.ScriptExecutorUtils.compileRuntimeProgram(ScriptExecutorUtils.java:159)
> ... 54 more
> ----------------------
>
> Thanks in advance for any help
> {{}}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)