Skip to content

Instantly share code, notes, and snippets.

@neworderofjamie
Created March 16, 2022 14:02
Show Gist options
  • Save neworderofjamie/d03e6efefb5bc015ecbfe9e91f47b6ce to your computer and use it in GitHub Desktop.
Save neworderofjamie/d03e6efefb5bc015ecbfe9e91f47b6ce to your computer and use it in GitHub Desktop.
strategy pattern for output layers
# Create sequential model
model = SequentialModel()
with model:
input = InputLayer(IntegrateFireInput(v_thresh=5.0), 784)
Layer(Dense(weight=weights[0]), IntegrateFire(v_thresh=5.0))
Layer(Dense(weight=weights[1]), IntegrateFire(v_thresh=5.0, output=SpikeCount()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment