Get the App
SLTechnology News&Howtos  ›  Development  › 

How to install Magenta js

Shulou Source: shulou.com Published: 2022-06-02 15:49:52 09月30日 Update

This article introduces the relevant knowledge of "how to install Magenta js". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

Magenta.js Music generation package based on TensorFlow.js. Use machine intelligence to generate music and art in the browser.

Installation of Magenta.js

OS: Give up Windows and choose Linux or Unix

There is really no way to run directly on windows now. I just wanted to try new technology and apply container-docker, but I can't install docker successfully without HyperV for Windows Professional.

Install on Linux

Basic programming environment

python2.7/3.* TensorFlow API can be used

Java Environment: JDK

Can be installed with apt-get

By the way, add java to the environment, modify bashrc. PATH="$PATH:$HOME/bin" in linux

I won't repeat this part, anyway, if you want this, Baidu will basically bid farewell to programming.

This is what the group does:

$sudoapt-getinstallpython-pippython-dev

$sudopipinstall--upgradehttps://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl

Magenta.js Start writing

Command can be saved as bash format for later use, I am divided into four steps, compiled four batch files, please pay attention to modify the path.

//You need to download something from github halfway, so please keep the network open.

Create a melody database

#!/ bin/bash

##Create Melody Database

MIDI_DIRECTORY=/home/liukun/TensorFlow/magenta/music/train#Change this to your file path

SEQUENCES_TFRECORD=/home/liukun/TensorFlow/magenta/music/train/notesequences.tfrecord

bazelrun//magenta/scripts:convert_midi_dir_to_note_sequences--\

--midi_dir=$MIDI_DIRECTORY\

--output_file=$SEQUENCES_TFRECORD\

--recursive

"How to install Magenta js" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Tags: Environment path content data database file melody more knowledge music generation programming utility success smooth flow achievement of learning next operating system thing method Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Docker Apple Shulou Technology Linux