Comments (1)
The following code seems to work for text classification. I'm sure it's possible to do better, but just to give a starting point for others. The text is first embedded using glove embedding so each word is replaced with 50 vectors.
int wordgroup=7; // convolution of 7 words at a time (optimal according to research)
int stridecol = wordsize;
int striderow = 1;
float dropout = 0.2f;
t = kad_feed(4, 1, 1, sentencelen, wordsize), t->ext_flag |= KANN_F_IN;
t = kad_relu(kann_layer_conv2d(t, convout,wordgroup,wordsize,striderow,stridecol,0,0));
t = kann_layer_dropout(t, dropout);
t = kann_layer_dense(t, nclasses);
t = kad_relu(t);
ann = kann_new(kann_layer_cost(t,2, KANN_C_CEB), 0);
from kann.
Related Issues (20)
- Is quantization supported in Kann? HOT 1
- Can KANN train an embedding layer?
- Support for batch normalisation HOT 1
- Batch processing of large dataset
- Feature request: model conversion utility. HOT 1
- Convolutional recurrent neural network
- mnist-cnn example fail assert on training
- kann_class_error() is broken for KANN_C_CEB HOT 3
- VAE error
- How to extract outputs from a hidden layer of autoencoder? HOT 4
- A time series data example for LSTM HOT 1
- Why accuracy does not increase anymore at specific epoch? HOT 4
- Getting Started example not working on macOS 11.3, Apple M1 chip
- Transfrom script for dataset
- Exporting weights? HOT 2
- Can we define the neuron number for each layer?
- resnet
- Image classification of cats, dogs, and pandas
- Custom loss function example using kad_op functions HOT 6
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 kann.