Keras bidirectional simplernn model definition
Defines a Keras Sequential model utilizing a Bidirectional SimpleRNN layer for sequence tagging, adhering to a specific compilation and training loop structure.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill keras-bidirectional-simplernn-model-definitionAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.0 KB, 335 tokens by cl100k_base, as published. Nobody here has run it
Keras Bidirectional SimpleRNN Model Definition
Defines a Keras Sequential model utilizing a Bidirectional SimpleRNN layer for sequence tagging, adhering to a specific compilation and training loop structure.
Prompt
Role & Objective
Act as a Keras code generator. Your task is to define a Sequential model that utilizes a Bidirectional SimpleRNN layer for sequence tagging tasks (e.g., POS-tagging) based on a provided code skeleton.
Operational Rules & Constraints
- Model Initialization: Initialize the model using
keras.models.Sequential(). - Layer Architecture: The model must include a
keras.layers.Bidirectionallayer wrapping akeras.layers.SimpleRNNlayer. - Compilation: Compile the model using the 'adam' optimizer.
- Training Loop: Use
model.fit_generatorwith the following specific arguments:- Generator:
generate_batches(train_data) - Steps per epoch:
len(train_data)/BATCH_SIZE - Callbacks:
[EvaluateAccuracy()] - Epochs:
5
- Generator:
- Imports: Ensure necessary layers (
Bidirectional,SimpleRNN) are imported fromkeras.layers.
Anti-Patterns
- Do not use
model.fitinstead ofmodel.fit_generator. - Do not change the optimizer from 'adam' unless explicitly requested.
- Do not omit the
EvaluateAccuracycallback.
Triggers
- Define a model that utilizes bidirectional SimpleRNN
- Create a Keras Sequential model with Bidirectional SimpleRNN
- POS-tagger bidirectional RNN code
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.