conv-emotion | repo contains implementation of different architectures | Natural Language Processing library
kandi X-RAY | conv-emotion Summary
kandi X-RAY | conv-emotion Summary
This repo contains implementation of different architectures for emotion recognition in conversations.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Load data
- Helper function to update the text of a dictionary
- Calculates one hot labels for each class
- Build model
- Builds Maintask residuals
- Builds a maintask layer
- Calculate pairwise pair prediction
- Convert examples to features
- Convert an example row to a Feature
- Predict the given to_predict
- Predict examples
- Train the model
- Predict on the given dataset
- Generate a sequence
- Inference function
- Forward computation
- Train a new tokenizer
- Forward computation
- Predict using the model
- Evaluate the results of a prediction
- Generate tokens
- Get configuration
- Generate sequence
- Train a model
- Train a graph model
- Read data file
conv-emotion Key Features
conv-emotion Examples and Code Snippets
Community Discussions
Trending Discussions on conv-emotion
QUESTION
I am trying to implement the preprocessing code for this paper (code in this repo). The preprocessing code is described in the paper here:
"A convolutional neural network (Kim, 2014) is used to extract textual features from the transcript of the utterances. We use a single convolutional layer followed by max-pooling and a fully connected layer to obtain the feature representations for the utterances. The input to this network is the 300 dimensional pretrained 840B GloVe vectors (Pennington et al., 2014). We use filters of size 3, 4 and 5 with 50 feature maps in each. The convoluted features are then max-pooled with a window size of 2 followed by the ReLU activation (Nair and Hinton, 2010). These are then concatenated and fed to a 100 dimensional fully connected layer, whose activations form the representation of the utterance. This network is trained at utterance level with the emotion labels."
The authors of the paper state that CNN feature extraction code can be found in this repo. However, this code is for a complete model that does sequence classification. It does everything in the quote above except the bolded part (and it goes further to complete do classification). I want the edit the code to build that concatenates and feeds into the 100d layer and then extracts the activations. The data to train on is found in the repo (its the IMDB dataset).
The output should be a (100, ) tensor for each sequence.
Here's the code for the CNN model:
...ANSWER
Answered 2020-May-11 at 19:35The convolutional neural network you are trying to implement is a great baseline in the NLP domain. It was introduced for the first time in this paper (Kim, 2014).
I found very useful the code you report but may be more complex than we need. I try to rewrite the network in simple keras (I only miss regularizations)
QUESTION
Currently trying to make this repo works.
I'm trying to save the trained model in the local machine so can be applied later. I read in tensorflow's doc, seems pretty intuitive to save the model, by calling tf.save_model.save(object)
. But I'm not sure how to apply.
Original code is here: model.py Following is my changes:
...ANSWER
Answered 2020-Mar-10 at 08:56I believe you can use the tf.train.Saver class for this
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install conv-emotion
Setup an environment with Conda: conda env create -f environment.yml conda activate TL_ERC cd TL_ERC python setup.py
Download dataset files IEMOCAP, DailyDialog and store them in ./datasets/.
Download the pre-trained weights of HRED on Cornell and Ubuntu datasets and store them in ./generative_weights/
[Optional]: To train new generative weights from dialogue models, refer to https://github.com/ctr4si/A-Hierarchical-Latent-Structure-for-Variational-Conversation-Modeling .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page