Commit a7c84b82 authored by Manoj Plakal's avatar Manoj Plakal
Browse files

Concatenate instead of add in vggish_train_demo.py.

Also added 'sudo' to installation instructions.
parent b8e5a44b
......@@ -84,14 +84,15 @@ Here's a sample installation and test session:
# $ source vggish/bin/activate # Assuming you use bash
# Leave the virtual environment at the end of the session by running
# $ deactivate
# Within the virtual environment, do not use 'sudo'.
# Upgrade pip first.
$ python -m pip install --upgrade pip
$ sudo python -m pip install --upgrade pip
# Install dependences. Resampy needs to be installed after NumPy and SciPy
# are already installed.
$ pip install numpy scipy
$ pip install resampy tensorflow six
$ sudo pip install numpy scipy
$ sudo pip install resampy tensorflow six
# Clone TensorFlow models repo into a 'models' directory.
$ git clone https://github.com/tensorflow/models.git
......
......@@ -114,8 +114,8 @@ def _get_examples_batch():
noise_labels = np.array([[0, 0, 1]] * noise_examples.shape[0])
# Shuffle (example, label) pairs across all classes.
all_examples = sine_examples + const_examples + noise_examples
all_labels = sine_labels + const_labels + noise_labels
all_examples = np.concatenate((sine_examples, const_examples, noise_examples))
all_labels = np.concatenate((sine_labels, const_labels, noise_labels))
labeled_examples = list(zip(all_examples, all_labels))
shuffle(labeled_examples)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment