Sequence to Sequence Network using Convolution

Below is the step by step explaination of the sequence to sequence model using convolution.

Each block of code is explained in detail

Step1.Tokenize English and German text from a string into a list of strings

def tokenize_de(text):

return [tok.text for tok in spacy_de.tokenizer(text)]

def tokenize_en(text):

return [tok.text for tok in spacy_en.tokenizer(text)]

Step2:

The below diagram explains encoder convolution:

Encoder Convolution:

I have explored a few PyTorch functions:

These 5 functions can be found in:

https://jovian.ml/sudhakarmlal/01-tensor-operations

An short introduction about PyTorch and about these functions are as follows

• torch.zeros : creates an tensor(out of matrix) with all values 0
• torch.view : re-sizes the tensor to specific dimension
• torch.copy_ : copies one tensor to the other
• torch.to : to move the tensor to a specific device…

Understanding Text Analytics problem using Bayesian Theorem

The Bayesian Theorem is derived from the following conditional probability

P(A ^ B) = P (A) P(B/A)

P(B^A) = P(B)P(A/B)

From the above

P(A) P(B/A) = P(B) P(A/B)

Which can further be simplified to

P(B/A) = P(A/B)P(B) / P(A)

Let's try to re-write the above equation for a set of… 