Comments (3)
Great. Thanks! I will try this and let you know.
from ml-audio-classifier-example-for-pico.
Hi @rohanali1798,
You would have to change the classification head from:
classifier_head = tf.keras.layers.Dense(1, activation="sigmoid")(model_body.output)
to
# for 3 classes
classifier_head = tf.keras.layers.Dense(3, activation='softmax')(model_body.output)
in the transfer learning section, then ensure the training data has the appropriate labels for the multi-classification labels, and train with a SparseCategoricalCrossentropy
loss function (instead of BinaryCrossentropy
)
fine_tune_model.compile(
optimizer=tf.keras.optimizers.Adam(learning_rate=0.01),
loss=tf.keras.losses.BinaryCrossentropy(from_logits=False),
metrics=METRICS,
)
For the inference side, #1 (comment) has some tips.
from ml-audio-classifier-example-for-pico.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from ml-audio-classifier-example-for-pico.
Related Issues (13)
- What to modify for multi-label classification? HOT 2
- What's the TensorFlow version for this codelab HOT 2
- How to match picotool for this demo HOT 1
- Can I use this approach to detect a certain set of spoken words? HOT 2
- Fantastic Project! HOT 2
- How to train for well-known sounds? HOT 1
- Failed to initialize DSP Pipeline! HOT 1
- MAX9814 microphone module support HOT 1
- Issue in loading custom dataset HOT 2
- test_wav_data is not working HOT 7
- Inference not running with MAX9814 HOT 5
- Training with your own audio with MAX9814 and Pico Wireless HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ml-audio-classifier-example-for-pico.