brain.js icon indicating copy to clipboard operation
brain.js copied to clipboard

For LSTMTimeStep, how can I train data in the form of tensor (a, b, c)?

Open aweiu opened this issue 3 years ago • 0 comments

tensor(a, b, c):

  • a: samples
  • b: time steps
  • c: features

For example tensor(3, 4, 2): image

image

So, How can I process them as input parameters of LSTMTimeStep?

net.train([
  { input: [11, 12], output: [1] },
  { input: [13, 14], output: [2] },
  { input: [15, 16], output: [3] },
  { input: [17, 18], output: [4] },
])

net.train([
  { input: [21, 22], output: [5] },
  { input: [23, 24], output: [6] },
  ...
])

...net.train(...)

OR:

net.train([
  { input: [
      [11, 12],
      [13, 14],
      [15, 16],
      [17, 18]
   ], 
   output: [4]},
])

net.train([
  { input: [
      [21, 22],
      [23, 24],
      ...
   ], 
   output: [8]},
])

...net.train(...)

The question may be quite simple. Looking forward to your answer!

aweiu avatar Aug 25 '22 03:08 aweiu