I need to rewrite a model from Keras to Nengo-Loihi and run it with a backend on the chip (
nengo_loihi.Simulator). The model is a simple three-dense-layer network, but it’s not possible to import it directly from Keras to Loihi. I couldn’t find any examples of dense layers written in Nengo. Would it be possible to implement it? I would appreciate any suggestions and I attach a code snippet below.
dropoutRate = 0.25 inputArray = Input(shape=(input_shape,)) x = Dense(64, activation='relu')(inputArray) x = Dropout(dropoutRate)(x) x = Dense(32, activation='relu')(x) x = Dropout(dropoutRate)(x) x = Dense(32, activation='relu')(x) x = Dropout(dropoutRate)(x) output = Dense(5, activation='softmax')(x) model = Model(inputs=inputArray, outputs=output) model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])