Uploaded image for project: 'Periscope'
  1. Periscope
  2. MGNLPER-106

Cleanup the ranking workspace when changing the neural network size

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Obsolete
    • Icon: Neutral Neutral
    • None
    • None
    • None

      When changing the outputUnits value (for instance from default 10000 to 1000) in order to reduce NN size, if one doesn't cleanup the ranking workspace, an exception similar to the following will show in the logs upon selecting one search result.

      This is because the neural network loaded in memory was created with the previous configuration which doesn't match the new one.

      2019-03-21 12:32:53,293 ERROR gnolia.periscope.rank.ml.NeuralNetworkResultRanker: Failed to train ranking neural network
      *java.lang.IllegalArgumentException: Labels and preOutput must have equal shapes: got shapes [1, 10000] vs [1, 1000]*
      	at org.nd4j.base.Preconditions.throwEx(Preconditions.java:636) ~[nd4j-common-1.0.0-beta3.jar:?]
      	at org.nd4j.linalg.lossfunctions.impl.LossMCXENT.computeGradient(LossMCXENT.java:155) ~[nd4j-api-1.0.0-beta3.jar:1.0.0-beta3]
      

        Acceptance criteria

              Unassigned Unassigned
              slutz Simon Lutz
              AuthorX
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoR