0

Using Brainscript in CNTK 2.1 to define a basic network, what is the appropriate way to define multiple Evaluation Nodes?

I have created some custom functions and wish to use them collectively / simultaneously however when I use a comma separated list as per https://learn.microsoft.com/en-us/cognitive-toolkit/Special-Nodes I encounter the following error

[CALL STACK]
                evalNodes = (ce, te, tm)
                   ^
EXCEPTION occurred. while parsing: BrainScriptNetworkBuilder(27): ')' expected

When trying the "tag" approach I encounter the following error

                ce = ClassificationError (labels, out.z, tag=eval)
                                                 ^
EXCEPTION occurred. while evaluating: BrainScriptNetworkBuilder(21): unknown identifier 'eval'

Undoubtedly the issue is PEBKAC although I'd really appreciate a pointer or two on the correct way to achieve this outcome.

Peter
  • 13
  • 5

1 Answers1

0

BrainScript is case sensitive. Please change evalNodes to EvalNodes. For tag in ClassificationError, please use string for tag:

ce = ClassificationError(labels, out.z, tag='eval')
KeD
  • 221
  • 1
  • 3
  • Use of EvalNodes didn't work[CALL STACK] EvalNodes = (ce,tc,te,tm) ^ EXCEPTION occurred. while parsing: BrainScriptNetworkBuilder(29): ')' expected – Peter Sep 14 '17 at 07:03
  • It can only take one node. If you need to evaluate multiple metrics, please use evalNodeNames. – KeD Sep 15 '17 at 18:01