Hi @lgusm ,
Thanks for your answer. As you said, 'you defined an input of 1 variable ', and that was my main issue. After I read this tutorial, TensorFlow.js — Making Predictions from 2D Data (google.com) 5. I understand that units(size of the  weight’s matrix for the layer) and inputShape(how many values we want to have on the input) is sth a bit different from I thought.
So, I had to do 2 things:

change the input shape of my neural network
pass my input as Tensor2D with defined shape

Still do not know why I cannot use Tensor1D. I thought this will be treated as a single input, but it looks like every value of Tensor1D  is a single input data for neural network, and you will always get as many outputs as long as your Tensor1D input is. Do you know why this work like that?
Code should look like that:
function createNetwork(inputSize, outputSize) {
  const model = tf.sequential();
  model.add(
    tf.layers.dense({
      units: 1,
      inputShape: [inputSize],
      activation: 'relu'
    })
  );
  model.add(
    tf.layers.dense({
      units: 16,
      activation: 'relu'
    })
  );
  model.add(
    tf.layers.dense({
      units: outputSize
    })
  );
  model.compile({
    loss: 'meanSquaredError',
    optimizer: 'adam'
  });
  return model;
}

const network = createNetwork(3, 2);
const input = [[1, 2, 3]];
const sample = tf.tensor2d([1, 2, 3], [input.length, input[0].length]);
const prediction = network.model.predict(sample).arraySync();
console.log(prediction);

Live demo 3