original_docstring: dump the output of the NN to CSV file(s)
docstring: dump the output of the NN to CSV file(s)
docstring_tokens: dump the output of the NN to CSV file ( s )
code: def dumpNNOutput(self, rnnOutput):
          "dump the output of the NN to CSV file(s)"
          dumpDir = '../dump/'
          if not os.path.isdir(dumpDir):
              os.mkdir(dumpDir)
  
          # iterate over all batch elements and create a CSV file for each one
          maxT, maxB, maxC = rnnOutput.shape
          for b in range(maxB):
              csv = ''
              for t in range(maxT):
                  for c in range(maxC):
                      csv += str(rnnOutput[t, b, c]) + ';'
                  csv += '\n'
              fn = dumpDir + 'rnnOutput_' + str(b) + '.csv'
              print('Write dump of NN to file: ' + fn)
              with open(fn, 'w') as f:
                  f.write(csv)
code_tokens: def dumpNNOutput ( self , rnnOutput ) : dumpDir = '../dump/' if not os . path . isdir ( dumpDir ) : os . mkdir ( dumpDir ) maxT , maxB , maxC = rnnOutput . shape for b in range ( maxB ) : csv = '' for t in range ( maxT ) : for c in range ( maxC ) : csv += str ( rnnOutput [ t , b , c ] ) + ';' csv += '\n' fn = dumpDir + 'rnnOutput_' + str ( b ) + '.csv' print ( 'Write dump of NN to file: ' + fn ) with open ( fn , 'w' ) as f : f . write ( csv )
short_docstring: dump the output of the NN to CSV file(s)
short_docstring_tokens: dump the output of the NN to CSV file ( s )
comment: "dump the output of the NN to CSV file(s)"$SEP$# iterate over all batch elements and create a CSV file for each one