output dimensions tf.keras.dense

 

hi

i want to have a ohlc output from the model, and not sure if what I'm doing is correct, please tell me if I'm doing 0k

if I have this input:

n_features=x_train.shape[2]
n_steps_in, n_steps_out = time_step,4
kernel_reg=l2(0.0001)
n_kernel=2
verbose, n_epoch, batch_size = 1, 4000, 256
n_output=2
opt=Adam(learning_rate=0.00015)

n_epoch=3

model = Sequential()
model.add(Conv1D(filters=batch_size, kernel_size=n_kernel, activation='relu',input_shape=(n_steps_in,n_features),kernel_regularizer=kernel_reg))

and this output

model.add(Dense(n_steps_out))

Am I getting a prediction for ohlc correctly?


From keras:

Output shape

N-D tensor with shape: (batch_size, ..., units). For instance, for a 2D input with shape (batch_size, input_dim), the output would have shape (batch_size, units).

but not sure of what are/is units (in this case) ... I come from science ... and units in this case would be the units of the symbol. ... Am I doing correctly the dense output?


If all this is wrong. How should I aprox to getting ohlc output?


from what I've read:

Dense is the only actual network layer in that model.

A Dense layer feeds all outputs from the previous layer to all its neurons, each neuron providing one output to the next layer.

It's the most basic layer in neural networks.

A Dense(10) has ten neurons. A Dense(512) has 512 neurons.

So, how do I get ohlc output?


N edition:      this is the output as prediction I recieve (its normalized)

[[0.24187459 0.23041555 0.2521539  0.23702721]
 [0.24254392 0.2309861  0.2527642  0.23770528]
 [0.24318554 0.23147224 0.25382972 0.23817927]
 ...
 [0.11680577 0.10992223 0.12383074 0.11441012]
 [0.11696079 0.11012143 0.12374876 0.11467419]
 [0.11715052 0.11022141 0.12413556 0.11481805]]

is this correct? is it normalizing each column? how can I know if this is correct?

 
This mql forum. Not python. If someone finds your question interesting he will answer.
 
Oleksandr Medviediev #:
This mql forum. Not python.

you are right