Question

I am getting the following error when using the deeplearntoolbox. specifically, When executing the file test_example_DBN.m

??? Error: File: nneval.m Line: 18 Column: 17
Unbalanced or unexpected parenthesis or bracket.

Error in ==> nntrain at 66
        loss = nneval(nn, loss, train_x, train_y);

Error in ==> test_example_DBN at 38
nn = nntrain(nn, train_x, train_y, opts);
Was it helpful?

Solution

The number of left parenthesis is not equal to the number of right parenthesis in your nneval.m Line: 18.. You may look into the code by clicking this error message, and count the number of left parentheses and right parentheses on the line of code.

EDIT

I checked out the nneval.m file from github. What's your Matlab version? Try to change line 18 to :

[er_train, tmp]               = nntest(nn, train_x, train_y);

If your input has 6 argument, change line 22 as well:

[er_val, tmp2]             = nntest(nn, val_x, val_y);

The error message should be eliminated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top