Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to define Output Dimension in NCP/LTC network? #59

Open
Mariam-124 opened this issue Dec 19, 2023 · 0 comments
Open

How to define Output Dimension in NCP/LTC network? #59

Mariam-124 opened this issue Dec 19, 2023 · 0 comments

Comments

@Mariam-124
Copy link

Mariam-124 commented Dec 19, 2023

Hi , I am trying to use a multivariant LST model for stock price prediction , and that model defines output dimension which is different from input dimension.
But I am unable to understand how to add output dimension in NCP.

Previous model:
model = Sequential()
model.add(LSTM(64, activation='relu', input_shape=(trainX.shape[1], trainX.shape[2]), return_sequences=True))
model.add(LSTM(32, activation='relu', return_sequences=False))
model.add(Dropout(0.2))
model.add(Dense(trainY.shape[1]))

My LTC Model is

wiring = wirings.AutoNCP(8,1) # 8 neurons in total, 1 output (motor neuron)
model = keras.models.Sequential(
[
keras.layers.InputLayer(input_shape=(None, 5)),
# here we could potentially add layers before and after the LTC network
LTC(wiring, return_sequences=True),
]
)
model.compile(
optimizer=keras.optimizers.Adam(0.01), loss='mean_squared_error'
)

model.summary()

as I want my output to be 2 dimensional but this gives same output dimensions as input dimensions a 3

so please guide me as examples in docs only shows same input output dimensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant