Skip to Main Content
Java Deep Learning Projects
book

Java Deep Learning Projects

by Md. Rezaul Karim
June 2018
Intermediate to advanced content levelIntermediate to advanced
436 pages
10h 33m
English
Packt Publishing
Content preview from Java Deep Learning Projects

Preparing the train and test set using the Word2Vec model

Now, to prepare the dataset for training and testing, first, we have to download three files, which are outlined as follows:

  • A Google-trained Word2Vec model
  • A large Movie Review dataset
  • A sentiment labeled dataset

The pre-trained Word2Vec is downloaded from https://code.google.com/p/word2vec/ and then we can set the location for the Google News vectors manually:

public static final String WORD_VECTORS_PATH = "/Downloads/GoogleNews-vectors-negative300.bin.gz";

Then, we will download and extract the Large Movie Review dataset from the following URL.

public static final String DATA_URL = "http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz";

Now, let's set the location to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Deep Learning Essentials

Java Deep Learning Essentials

Yusuke Sugomori
Machine Learning in Java - Second Edition

Machine Learning in Java - Second Edition

AshishSingh Bhatia, Bostjan Kaluza
Mastering Java Machine Learning

Mastering Java Machine Learning

Uday Kamath, Krishna Choppella

Publisher Resources

ISBN: 9781788997454Supplemental Content