• 沒有找到結果。

AWS DeepComposer

N/A
N/A
Protected

Academic year: 2022

Share "AWS DeepComposer"

Copied!
64
0
0

加載中.... (立即查看全文)

全文

(1)

AWS DeepComposer

Developer Guide

(2)

AWS DeepComposer: Developer Guide

Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

(3)

Table of Contents

What is AWS DeepComposer? ... 1

Concepts and terminology ... 1

Keyboard hardware ... 5

Setup ... 5

Keyboard features ... 6

How it works ... 8

Getting started ... 9

Training a custom model for the AWS DeepComposer music studio ... 10

Using a custom trained model in the AWS DeepComposer music studio ... 11

Generative techniques ... 13

AR-CNN technique ... 13

Model parameter options for the AR-CNN technique ... 14

How the AR-CNN technique works with other generative techniques in the music studio ... 14

GANs technique ... 17

Performing inference using GANs in AWS DeepComposer ... 18

Model parameter options for the GANs technique ... 18

How the GANs technique works with other generative techniques in the music studio ... 19

Transformers technique ... 19

Model parameter options for the Transformers technique ... 19

How the Transformers technique works with other generative techniques in the music studio ... 21

Performing inference with the Transformers technique ... 21

Creating compositions ... 24

Using a sample melody ... 24

AWS DeepComposer Music studio ... 25

Classic music studio ... 25

Recording a custom melody ... 26

AWS DeepComposer Music studio ... 26

Classic music studio ... 26

Importing a melody ... 28

AWS DeepComposer Music studio ... 28

Classic music studio ... 29

Train and evaluate models ... 30

Key words and phrases ... 30

Evaluating a pretrained model ... 31

Evaluating a custom model ... 32

Evaluating a model when training is unsuccessful ... 33

Learn more ... 34

Launching a Amazon SageMaker notebook instance ... 35

Requesting a service limit increase ... 35

Create a SageMaker notebook instance ... 36

Editing music ... 37

Available editing tools ... 37

Changing tempo ... 37

Changing pitch ... 38

Edit the melody ... 39

Rhythm assist ... 41

Security ... 42

AWS Identity and Access Management ... 42

Audience ... 43

Authenticating With Identities ... 43

Managing Access Using Policies ... 45

How AWS DeepComposer works with IAM ... 46

Identity-based policy examples ... 48

Troubleshooting ... 50

(4)

Data protection ... 52

Data encryption ... 52

Compliance Validation ... 52

Infrastructure security ... 53

AWS DeepComposer-dependent services ... 53

Browser support ... 55

Tagging ... 56

Managing Tags ... 56

Using tags in IAM policies ... 56

Creating and editing tags for models trained in AWS DeepComposer ... 57

Creating and editing tags for compositions created in the AWS DeepComposer music studio ... 58

Additional information ... 58

Document history ... 59

AWS glossary ... 60

(5)

Concepts and terminology

What is AWS DeepComposer?

AWS DeepComposer provides a creative, hands-on experience for learning generative AI and machine learning. With generative AI, one of the biggest recent advancements in artificial intelligence, you can create a new dataset based on a training dataset. With AWS DeepComposer, you can experiment with different generative AI architectures and models in a musical setting by creating and transforming musical inputs and accompaniments.

Regardless of your experience with machine learning (ML) or music, you can use AWS DeepComposer to develop a working knowledge of generative AI. AWS DeepComposer includes learning capsules, sample code, and training data to help you understand and use generative AI models.

To get started with AWS DeepComposer, start the AWS DeepComposer Music studio, choose one of the sample melodies, and choose a pretrained model. After you generate a composition, you can change the instruments, download your new composition, and share it with friends on SoundCloud.

To flex your creativity, record a custom melody using either the console-based keyboard or the AWS DeepComposer keyboard. To dive deeper, start training custom models using training data provided by AWS. Want more? Learn how to create your own generative adversarial networks (GANs) by using the examples in Jupyter notebooks for SageMaker.

Important - Browser requirements

AWS DeepComposer fully supports the Chrome browser. Other browsers offer limited support for the AWS DeepComposer console and hardware. For more information about browser compatibility, see Browser support (p. 55).

Topics

• AWS DeepComposer concepts and terminology (p. 1)

• AWS DeepComposer keyboard (p. 5)

AWS DeepComposer concepts and terminology

AWS DeepComposer builds on the following concepts and uses the following terminology.

AutoregressiveCNN Bach

A pretrained autoregressive convolutional neural network (AR-CNN) model that is available in the AWS DeepComposer music studio. This model has been trained on a dataset containing only Bach chorales. It uses the U-net architecture.

autoregressive convolutional neural network (AR-CNN)

A generative AI technique that edits your input melody. This technique uses a U-Net architecture and was trained on a collection of chorales by Johann Sebastian Bach. The AR-CNN technique works by detecting notes that sound missing or out place based on the training dataset. The identified notes are then replaced with notes that the model thinks would fit the distribution of notes learned during training.

autoregressive model (AR model)

A linear model often used with time-series data, where previous values are used to predict a current or future value.

(6)

Concepts and terminology

AWS DeepComposer keyboard

Also known as the AWS DeepComposer physical keyboard or hardware keyboard. You can connect, or link, the keyboard to a computer that has access to the AWS DeepComposer console. You can use the linked keyboard to play and record short melodies that are fewer than eight bars. Then use a recorded melody with a supported AWS DeepComposer generative AI technique.

compositions

Sequences of notes, melodies, harmonies, and rhythms that make up a musical work.

In AWS DeepComposer, a composition also represents a saved piece of music. Each time you use a generative technique to perform inference, your output is automatically saved as a composition.

computer vision (CV)

A field of machine learning that is focused on creating models that understand the visual world by interpreting images and videos. Computer vision can be used for tasks like objection identification and video tracking.

convolutional neural network (CNN)

A type of neural network commonly used for image-recognition and video-recognition tasks. A CNN filters and summarizes the data during training to learn patterns. This mathematical process is called convolution.

decoder

A process that takes an input vector, commonly a feature matrix, and transforms the vector into an output. A decoder can be used with an encoder. AWS DeepComposer uses an encoder-decoder network for some generative AI tasks.

Dataset

A term used to describe a structured collection of data.

The data can be thought of as simply an example or observation.

Before model training, datasets are often split into subsets of data to help ensure accurate results.

For more information about two common subsets see, testing dataset (p. 4) and training dataset (p. 4).

discriminator

A classifier model, one part of a generative adversarial network (GAN). The discriminator classifies data as real or as generated. In AWS DeepComposer, this model tries to determine if a generated piano roll looks like a real image or an artificially created image. The discriminator is trained on real data.

drum in pattern

A ratio of the total number of notes in a drum track to a predetermined beat popular in 4/4 time.

empty bar rate

The ratio of empty bars to the total number of bars.

encoder

A process that translates data from one format to another. AWS DeepComposer uses multiple encoders. For example, it uses an encoder to translate an input MIDI file into a piano roll image.

Often, an encoder is used with a decoder.

epoch

One complete pass through the training dataset by the neural network. For example, if you have 10,000 music tracks in the training dataset, one epoch represents one pass through all 10,000

(7)

Concepts and terminology

tracks. The number of epochs required for a model to converge varies based on the training data. An iterative algorithm converges when the loss function stabilizes.

generative adversarial network (GAN)

Two neural networks that consist of a generator and a discriminator. In AWS DeepComposer, the generator learns to compose music that sounds as realistic as possible with feedback from the discriminator. The discriminator treats the generator's output as sounding as unrealistic as possible while holding the input training sample as the ground truth. Training proceeds, with the generator searching for its network weights by minimizing the chances that its generations differ from the training samples. The discriminator searches for the weights of both networks by minimizing the chances it misjudges the training samples as realistic compositions and the generator's outputs as unrealistic compositions. The efforts made by both the generator and the discriminator push the generator's network weights in opposite directions. This is the essence of the adversarial role that the discriminator takes against the generator. Learning proceeds until equilibrium is reached, where the generator improves its output to such a degree that the discriminator can no longer distinguish between the generated composition and training samples.

hyperparameters

Algorithm-dependent variables that you can control. You can tune hyperparameters to find the best fit for a specific problem that you are trying to model.

inference

Predictions generated by a trained model.

in scale ratio

The ratio of the average number of notes in a bar of music that are in the key of C, to the total number of notes in a bar of music.

learning rate

A hyperparameter used for training neural networks. The learning rate controls how much the weights and biases are updated during training.

loss function

Evaluates how effective an algorithm is at modeling the data. For example, if a model consistently predicts values that are very different from the actual values, it returns a large loss. Depending on the training algorithm, more than one loss function might be used.

model

The final output created while training with a machine learning algorithm. The algorithm used to train the model finds patterns in the training data uses those patterns to map the input data attributes to the target (the answer that you want to predict). The algorithm outputs a machine learning model that captures these patterns.

MuseGAN

A generative adversarial network (GAN) architecture built specifically to generate music. Like other GANs, MuseGAN is made of both a discriminator and a generator that use a CNN. The MuseGAN architecture is available in AWS DeepComposer. To learn more about the MuseGAN architecture, see Creating the MuseGAN architecture.

Music studio

A component of the AWS DeepComposer console that provides access to a console-based keyboard for playing, recording, and composing music. With Music studio, you can try out AWS DeepComposer before purchasing an AWS DeepComposer physical keyboard. You don't need to train a model to use Music studio.

(8)

Concepts and terminology

neural network

Also known as an artificial neural network. A collection of connected units or nodes that are used to build an information model based on biological systems. Each node is called an artificial neuron. An artificial neuron mimics a biological neuron in that it receives an input (stimulus), becomes activated if the input signal is strong enough (activation), and produces an output based on both. Neural networks are widely used in machine learning because an artificial neural network can serve as a general-purpose approximation to any function.

piano roll

A type of music roll that encodes a musical score in a manner that is machine readable. In AWS DeepComposer, they are used to train both the GAN models and the AR-CNN model. In each image, the horizontal axis represents time and the vertical axis represents pitch.

pitch

The frequency of a sound, often judged to be high or low. In the AWS DeepComposer Music studio, you can adjust the pitch of a sample, imported, or custom recorded input melody.

pitches used

A metric that captures the average number of notes in each bar.

polyphonic rate

The ratio of the number of time steps where the number of pitches being played is greater than the threshold number of allowable time steps.

Rhythm assist

An AWS DeepComposer music editing tool that automatically corrects the timing of musical notes in your input. Use Rhythm assist when your melody contains the right notes but isn't consistently in time with the beat. Rhythm assist is available in classic music studio studio experience.

tempo

How fast music is played. Music typically follows a certain beat or meter, which drives the rhythm of the notes played. The speed of this beat is measured in beats per minute. A higher number of beats per minute corresponds to a faster tempo, or playback speed.

testing dataset or test set

Part of a dataset (p. 2) used evaluate the accuracy of the model trained using a training dataset (p. 4).

Transformers

A generative AI technique that uses attention to understand the relationship between notes in a musical composition. To train the model, the musical data are converted into tokens. These tokens are used to represent a musical event in a given piece of music. During inference, the Transformers technique will extend your input track by up 30 seconds.

TransformerXLClassical

A model based on the Transformer architecture. Compared with the traditional Transformer architecture, this model can better understand long-term dependencies and has decreased latency times.

training dataset

Part of a dataset (p. 2) used while training a machine learning model.

U-Net

A generative adversarial network (GAN) architecture built originally for image recognition tasks.

The U-Net is a CNN. It's named for its U-like shape, in which the layers on the left side can pass information to the layers on the right side without passing through the entire neural network.

(9)

Keyboard hardware

update ratio

A hyperparameter that controls the number of model weight updates to the discriminator per update to the generator. A lower update ratio makes a stronger discriminator that can provide more accurate and useful information to the generator. The lower update ratio, however, increases training time.

virtual keyboard

Also known as the AWS DeepComposer console-based keyboard. The virtual keyboard is available in the AWS DeepComposer Music studio. The virtual keyboard runs on any computer or mobile device that is connected to the AWS Cloud. You can use the virtual keyboard to play and record a short melody. You can then use the recorded melody with a supported AWS DeepComposer generative AI technique to create new musical compositions.

AWS DeepComposer keyboard

The AWS DeepComposer keyboard is a music keyboard that you can use to get hands-on experience learning generative AI and machine learning (ML). You can connect it to any computer that has access to the AWS DeepComposer console, play and record a short melody, and feed the melody to a supported generative AI architecture supported by AWS DeepComposer.

Setting up the AWS DeepComposer keyboard

To get started using your AWS DeepComposer keyboard, link your device inside the AWS DeepComposer console. To do so, follow the steps outlined below.

Connecting the AWS DeepComposer keyboard

1. Open the link your keyboard section of the AWS DeepComposer console.

2. Use the included USB cable to connect the keyboard to your computer.

3. On the back of the keyboard, locate the 8- or 16-digit alphanumeric serial number (S/N or DSN).

4. In step 2 in the AWS DeepComposer console, enter the alphanumeric serial number.

Important - Browser requirements

AWS DeepComposer fully supports the Chrome browser. Other browsers offer limited support for the AWS DeepComposer console and hardware. For more information about browser compatibility, see Browser support (p. 55).

(10)

Keyboard features

AWS DeepComposer keyboard features

(11)

Keyboard features

The AWS DeepComposer keyboard is 32-key, 2 octave keyboard. It has several built-in features that are designed to increase the usability of the AWS DeepComposer keyboard.

Arpeggiator (arp)

To create an arpeggio, use this button to step through a group of notes in a particular sequence to create an arpeggio.

Auto-chord (chord)

Use this button to generate a chord by playing a single note. When you play a note, the auto-chord feature generates a simple triad chord using the note provided as the root note.

Modulation

Use this wheel to modulate the synthetic audio signal to create a vibrato effect.

Octave adjust

The default starting position of the AWS DeepComposer keyboard is the C4 and C3 octaves. The octave down button adjusts the keyboard down one or more octaves. The octave up button adjusts the keyboard up one or more octaves.

Pitch

Use this wheel to slightly bend (change) the pitch of a note up or down.

Playback

Use this button to playback a melody that you just recoreded.

Record

Use this button to begin recording a melody on your keyboard. To stop recording, tap the button again.

Sustain switch interface

You can plug any universal MIDI-compliant sustain pedal into your keyboard through this port.

Tap tempo

Tap this button to set the arpeggio tempo manually.

USB cable port

Use this port to connect the physical keyboard to the AWS DeepComposer console (Music studio).

Volume

Use this slider enables to adjust the volume on your keyboard.

(12)

How AWS DeepComposer works

At a fundamental level, music composition corresponds to sequences of notes of intricate tempo and dynamics. Musical compositions are categorized into genres based on discernible differences in the distribution different musical elements. To compose music for specific genre you have learn that genre specific distribution. At its core that is what the different generative AI techniques in AWS DeepComposer allow you to do.

This process involves figuring out the appropriate patterns and how to arrange them together in cohesive way. Aspiring composers typically have to spend several years training to learn these patterns.

When composers graduate, they have developed an acute appreciation of the distributions of different musical elements in the genres they studied. Their understanding might be built on non-quantitative terms but they have built a quantitative distribution into their brains. They have developed a a natural neural network model of music composition and mastered ways to apply the model with great proficiency.

In machine learning, it's analogous to teaching a machine to compose music of a given genre. The machine learns the compositional features or patterns from a known musical collection to develop a practical understanding of the distribution of musical elements. The knowledge is built into an artificial neural network and represented by a set of optimal network weights of a chosen architecture.

(13)

Getting started with AWS DeepComposer

When you use the AWS DeepComposer Music studio experiences, your creativity and generative AI can come together. To start using AWS DeepComposer, you need a trained model and an input track. AWS DeepComposer provides a sample model for each available generative technique. You can also train a custom model using a generative adversarial network (GAN) (p. 3) architecture.

For an input track you can use a sample input track, record a custom input track, or import a track.

If you're new to machine learning or generative AI, see learning the basics of generative AI to get started. If you want a deeper dive into the different generative AI techniques supported by AWS DeepComposer, the learning capsules provide an introduction.

Note

To use the AWS DeepComposer console and other AWS services, you need an AWS account.

If you don't have an account, see aws.amazon.com and choose Create an AWS Account. For detailed instructions, see How do I create and activate a new AWS account?.

As a best practice, you should also create AWS Identity and Access Management (IAM) users or groups. We recommend that you always use the minimun permissions required to accomplish a task. Create a password for console access, and access keys to use command line tools. For more information, see Creating your first IAM admin user and group in the IAM User Guide.

Important - Browser requirements

AWS DeepComposer fully supports the Chrome browser. Other browsers offer limited support for the AWS DeepComposer console and hardware. For more information about browser compatibility, see Browser support (p. 55).

This procedure shows you how to use a sample input melody and a sample model to create your first composition in under five minutes. Using a sample input track is the quickest way to get started with AWS DeepComposer. In this procedure, you will use the autoregressive convolutional neural network (AR- CNN) (p. 1) generative technique as your trained model and 'Ode to Joy' as your input track.

AWS DeepComposer supports two music studio experiences. You can create music using the Music studio or use the classic music studio.

This procedure uses the Music studio.

To generate a composition with sample input track and sample model

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Music studio.

3. To get started, choose Start composing.

4. On the Input track page, under Choose an input track, choose the down arrow (▼).

5. Choose Ode to Joy.

6. Choose Continue.

7. On the ML technique page, choose AR-CNN.

8. Choose Continue.

9. On the Inference output page, you can do the following:

• Change the AR-CNN parameters, choose Enhance again, and then choose Play to hear how your track has changed.

• Choose Edit melody to modify and change the notes that were added during inference.

(14)

Training a custom model for the AWS DeepComposer music studio

Important

Each time you perform one of the preceding modifications, your composition is automatically saved as a new composition.

10. Choose Continue to finish creating your composition in the music studio.

After creating your composition, you can use the Editing music with AWS DeepComposer (p. 37) topic to learn how you can edit your compositions in the AWS DeepComposer console. To find your newly created compositions, choose Compositions from the navigation pane.

To create a composition, AWS DeepComposer performs inference (p. 3) with a trained model and an input track. After you create your first few compositions, you can experiment by modifying the hyperparameters (p. 3) available in the AWS DeepComposer music studio to learn more about how generative AI works.

AWS DeepComposer supports two music studio experiences. You can create music using the Music studio or use the classic music studio.

In the next section, you will learn how to train a custom model in the AWS DeepComposer console using the GAN architecture, and then how to use that trained model in the music studio.

Training a custom model for the AWS DeepComposer music studio

In this section, you will learn how to train a custom model using the AWS DeepComposer console. After successfully training your custom model, you can use it in the music studio.

This procedure uses the AWS DeepComposer music studio.

To train a custom model

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Models.

3. On the Models page, choose Create a model.

4. On the Train a model page, under Generative algorithm, choose MuseGAN.

Both the MuseGAN and U-Net algorithms are based on convolutional neural networks (CNNs). These CNNs generate a high-level image-based representation of music called a piano roll, which is used to generate the output tracks.

5. For Training dataset, choose jazz.

6. For Hyperparameters, choose the following suggested values.

Hyperparameters are algorithm-dependent variables that you control. You can tune the hyperparameters to find the best fit for the specific problem that you are trying to model.

When you initialize training a new model using AWS DeepComposer, the initial weights and biases are randomized, and so you might notice differences in the compositions created by training a model with the same hyperparameter settings.

Hyperparameter Value

Epoch (p. 2) 100

(15)

Using a custom trained model in the AWS DeepComposer music studio

Hyperparameter Value

Learning rate (p. 3) 0.001

Update ratio (p. 5) 4

7. Under Model details, give your model a name and an optional description.

8. Choose Start training.

9. To check the status of training, in the navigation pane, choose Models. The status of the training appears under Status.

After the model has been trained successfully, the status changes to Training complete.

After successfully training your model, you are now ready to use it in the music studio.

To explore and evaluate your model's training in more detail, see Evaluating a model (p. 30).

Using a custom trained model in the AWS DeepComposer music studio

In this section, you will learn how to use a custom trained model in the AWS DeepComposer music studio. You can use the previous procedure to train a custom model or use any model you've previously trained.

To generate a composition using a sample input track and custom model

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Music studio.

(16)

Using a custom trained model in the AWS DeepComposer music studio 3. To get started, choose Start composing.

4. On the Input track page, under Choose an input track, choose the down arrow (▼).

5. Choose Ode to Joy.

6. Choose Continue.

7. On the ML technique page, choose GANs.

8. Next, under Generative algorithm select the architecture used to train your custom model.

9. Under Model locate the subsection Custom models to find your custom trained model.

10. Choose Continue.

11. Choose Play (▶) to listen to your new composition.

12. (Optional)Choose Generate tracks to create four new accompaniments tracks.

Note

Each time you choose Generate tracks,your new composition will automatically be saved.

13. Choose Continue.

14. Choose Continue to finish creating your composition in the music studio.

In the previous procedure you saw how to use a custom trained model in the AWS DeepComposer music studio. After training your first custom model, see Training models in AWS DeepComposer (p. 30) to learn more about training custom models.

In this chapter you learned how to create a simple composition using sample input track in the AWS DeepComposer music studio. You also learned how to train a custom model using AWS DeepComposer and how to use that trained model in the music studio to create a composition.

(17)

AR-CNN technique

Generative techniques in AWS DeepComposer

The AWS DeepComposer music studio supports three generative AI techniques. In the following topics you can learn about each of the three available techniques, and how to use them in the two different music studio experiences.

Each available generative technique works in a similar fashion.To create compositions, you perform inference (p. 3) by using a trained model and an input track.

To create more complex compositions you can dabble in human-ai collaboration by using the Edit melody (p. 39) tool to collaborate with compatible generative AI techniques.

For a deeper introduction into the different generative AI techniques supported by AWS DeepComposer, see the Learning capsules.

If you are new to machine learning, generative AI, or the different AWS DeepComposer Music studio experiences, see the Getting started with AWS DeepComposer (p. 9) topic, or the tutorial about the basics of generative AI.

Important - Browser requirements

AWS DeepComposer fully supports the Chrome browser. Other browsers offer limited support for the AWS DeepComposer console and hardware. For more information about browser compatibility, see Browser support (p. 55).

Generative techniques availabe in AWS DeepComposer

• Using the AR-CNN technique in the AWS DeepComposer music studio experiences (p. 13)

• Using the GANs technique in the AWS DeepComposer music studio experiences (p. 17)

• Using the Transformers technique in the AWS DeepComposer music studio experiences (p. 19)

Using the AR-CNN technique in the AWS DeepComposer music studio experiences

You can use the the autoregressive convolutional neural network (AR-CNN) technique in either AWS DeepComposer music studio experience.

The AR-CNN generative technique uses a U-Net architecture. It was originally developed for image generation, a type of computer vision task.

The available AR-CNN model in AWS DeepComposer was trained using a dataset that consists of chorales written and composed by Johann Sebastian Bach. To train the model, the audio files are first converted into piano roll (p. 4) images. Then, during model training, notes are first randomly added and removed from the piano roll images. Next, the model learns to detect them and replace the notes with new ones based on the dataset.

When you perform inference (p. 3) with the AR-CNN model in either AWS DeepComposer music studio, the model will first attempt to detect notes that sound missing or out place. The model determines if a note is missing or out of place by comparing it against dataset it was trained on. It then replaces those notes with ones that are likely to appear in the dataset it was trained on.

The AR-CNN generative technique allows you

(18)

Model parameter options for the AR-CNN technique

Using the different available model parameters you can modify to what extent the model will add and/

or remove notes during inference. For more information on about these parameters

For more details about the AR-CNN model check out these resources:

Learning capsule: Learn the basics of generative AI and GANs

Learning capsule: Introduction to autoregressive convolutional neural network

Learning capsules: A deep dive into training an AR-CNN model

Open source GitHub project: Train your own AR-CNN based model

Model parameter options for the AR-CNN technique

The model parameters for the AR-CNN technique are the same in both AWS DeepComposer Music studio experiences.

The AR-CNN technique uses the AutoregressiveCNN Bach sample model. To help create unique musical tracks, you can modify the different parameters. These parameters, also known as inference hyperparameters, control how much the model changes your melody.

Sampling iterations

Controls the number of times your input melody is passed through the model. Increasing the number of iterations results in more notes being added and removed from the melody.

Maximum input notes to remove

Controls the percentage of input melody to be removed during inference. By increasing this parameter, you are allowing the model to use less of the input melody as a reference during inference. After performing inference, you can use the Edit melody (p. 39) tool to further modify your melody.

Maximum number of notes to add

Controls the number of notes that can be added to the input melody. By increasing this number, you might introduce notes that sound out of place in your melody. It's also a creative way to experiment with your chosen melody. After performing inference, you can use the Edit melody (p. 39) tool to further modify your melody.

Creative risk

Controls how much the model can deviate from the music that it was trained on. More technically, when you change this value, you are changing the shape of the output probability distribution. If you set this value too low, the model will choose only high-probability notes. If you set this value too high, the model will more likely choose lower-probability notes.

How the AR-CNN technique works with other generative techniques in the music studio

In both AWS DeepComposer Music studio experiences, you can use the AR-CNN technique in collaboration with the GANs technique or the Transformers technique. When using the AR-CNN technique with either technique, you must start by working with the AR-CNN technique.

With the GANs technique, you can create accompaniment tracks, but when you return to your edited melody, those accompaniment tracks will no long be available.

After you switch to the Transformers technique, you cannot return to the AR-CNN technique to further edit your melody.

(19)

How the AR-CNN technique works with other generative techniques in the music studio

Note

Each time your perform inference with the AR-CNN technique, your new composition is saved automatically. Choose Download melody if you want to save a melody that you have modified using the Edit melody tool before performing inference another time.

Performing inference with the AR-CNN technique in the AWS DeepComposer Music studio

In the music studio Music studio experience, you can use a sample track, record a custom track, or import a track with the AR-CNN technique. You can find the AR-CNN technique on the ML technique page.

The AR-CNN technique modifies the notes in your input melody. After you create your first new melody, you can modify the AR-CNN parameters that are available for this technique.

This model adds and removes notes in your input track. If you are unhappy with some of the changes that the model made during inference (p. 3), you can help the model by editing the notes in the melody.

Use the Edit melody tool to add or remove notes, or to change the pitch or the length of notes in the track that was generated. You can then perform inference on the edited track.

On the Inference output page, you can choose Enhance again to perform inference multiple times. You can also access the Edit melody tool from this page.

Edit melody changes are not saved until inference is performed again.

To save these changes prior to to performing inference again, choose Download melody.

To edit your input melody

1. Choose Edit melody.

2. On the Edit melody page, you can edit your track in the following ways:

• Choose (double-click) a cell to add or remove a note.

• Drag a cell up or down to change the pitch of a note.

• Drag the edge of a cell left or right to change the length of a note.

(20)

How the AR-CNN technique works with other generative techniques in the music studio 3. To listen to your changes, choose Play (▶).

4. When you have finished, choose Apply changes.

Performing inference with the AR-CNN technique in the classic music studio

In the classic music studio experience, you can use a sample melody, record a melody, or import a melody with the AR-CNN technique. One your select your input melody in the , and choose Enhance melody the AR-CNN technique modifies the notes in your input melody.

You can use the Advanced parameters to adjust how much your input track is modified during inference (p. 3). If you are unhappy with some of the decisions that the model made during inference, you can help the model by editing notes in the melody. Use the Edit melody tool to add or remove notes, or to change the pitch or the length of notes in the track that was generated. You can then perform inference, again, on the edited track.

Edit melody changes are not saved until inference is performed again.

To save these changes prior to to performing inference again, choose Download melody.

To edit your input melody

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Use the classic music studio.

3. To open the Input melody section, choose the right arrow (▶).

4. Choose Edit melody.

5. Under Source of input melody, choose Sample melody, Custom recorded melody, or Imported track.

6. On the Edit melody page, you can edit your track in the following ways:

• Choose (double-click) a cell to add or remove a note.

• Drag a cell up or down to change the pitch of a note.

• Drag the edge of a cell left or right to change the length of a note.

(21)

GANs technique

7. To listen to your changes, choose Play (▶).

8. When you have finished, choose Apply changes.

Using the GANs technique in the AWS DeepComposer music studio experiences

The generative adversarial networks (GANs) technique is supported in both AWS DeepComposer Music studio experiences.

GANs are neural networks that consist of a generator and a discriminator. In AWS DeepComposer, the generator learns to compose music that's as realistic as possible with feedback from the discriminator.

The discriminator treats the generator's output as being as unrealistic as possible, while holding the input training sample as the ground truth.

In either music studio, two different GAN architectures are available, MuseGAN and U-Net. Both architectures use a convolutional neural network (CNN). A CNN is used because the first step in training these models is to convert the input audio into an image-based representation of music called a piano roll (p. 4).

MuseGAN

The MuseGAN architecture was built specifically to generate music. AWS DeepComposer comes with five genre-based sample models that use the MuseGAN architecture. In AWS DeepComposer, you can also train a custom MuseGAN model and use it in either music studio experience.

U-Net

Adapted for music generation, U-Net architecture was originally developed for image-generation tasks. The name for this architecture stems from its unique U shape. This shape allows the CNN to

(22)

Performing inference using GANs in AWS DeepComposer

pass information on the left side (the encoder) to the layers on the right side (the decoder) without passing through the entire neural network. AWS DeepComposer does not have a sample model that uses the U-Net architecture. Instead, you can train a custom U-Net model and use it in either music studio experience.

To learn more about training a custom model using AWS DeepComposer, refer to the topic on training a custom model (p. 10).

For more details about GANs model check out these resources:

Learning capsule: Learn the basics of generative AI and GANs.

Open source GitHub project: Train your own GAN based model.

Performing inference using GANs in AWS DeepComposer

In either AWS DeepComposer Music studio experience, you can use the GANs technique to perform inference, which creates four new accompaniment tracks based on your input track.

You can use a sample melody, record a custom melody, or import a melody with the GANs technique.

For more information, see the topic creating compositions with the AWS DeepComposer music studio (p. 24). in the AWS DeepComposer Developer guide.

The GANs technique creates four accompaniment tracks based on your input melody. Each

accompaniment track initially comes from a broad class of musical instruments. You can modify the instrument class and type for each accompaniment track except for drums.

To modify your accompaniment tracks, you can use the same steps in either AWS DeepComposer music studio experience. The only difference is where this feature is located. In the classic music studio experience, you can access your newly generated tracks on the music studio landing page. In the AWS DeepComposer music studio experience, you can access the accompaniments on the Inference output page.

To change an instrument type after generating a composition

1. To open an Instrument type, such as String ensemble 1, choose the right arrow (▶).

2. Choose an instrument type.

3. Choose the down arrow (▼) to open the Instrument menu.

4. Choose an instrument.

Model parameter options for the GANs technique

When using the GANs generative technique, you can select from Sample models or Custom models. In either music studio experience, you can choose from five different genre-based Sample models, which were trained using the MuseGAN architecture.

If you trained a custom U-Net or MuseGAN model, you can find it and the Sample models label under Model.

In the remixed music studio, you can find the Model option on both the ML technique and the Inference output pages.

(23)

How the GANs technique works with other generative techniques in the music studio

How the GANs technique works with other generative techniques in the music studio

In either AWS DeepComposer music studio experience, you can use the GANs technique in collaboration with the AR-CNN technique. The GANs technique is not compatible with the Transformers technique.

To use the GANs technique with the AR-CNN technique, you must first use the AR-CNN technique to enhance your input melody. When ready, you can switch to the GAN technique and create accompaniment tracks.

Note

In the classic music studio experience, you can return to the AR-CNN technique after creating accompaniment tracks with the GANs technique. If you do so, the tracks generated with the GANs technique will be automatically saved as a new composition. When you modify your input melody using the AR-CNN technique, you must generate new accompaniment tracks, because the previously created accompaniment tracks cannot be accessed.

Using the Transformers technique in the AWS DeepComposer music studio experiences

In machine learning, the Transformers generative technique is used to solve sequence modeling

problems. In sequential modeling, the model takes into account a series of input values when generating the next output. To do this, the Transformers technique uses the concept of attention. This concept allows the model, when given a specific input sequence, to better understand which other parts of the sequence are important.

Unlike the GANs and AR-CNN techniques, the Transformers technique doesn't treat music generation as an image-generation problem. Instead, it treats music generation like a text-generation problem. To solve this problem, the model needs to create tokens that represent the musical inputs. The tokens are used to predict which notes should come next. In AWS DeepComposer, the Transformers technique uses the style, pattern, or musical motifs found in the input melody to generate the new composition.

Also unlike the GANs and AR-CNN techniques, the Transformers technique extends your input melody.

Edit melody changes are not saved until inference is performed again.

To save these changes prior to to performing inference again, choose Download melody.

For more details about the Transformers model, check out these resources:

Learning capsule: Learn the basics of generative AI and GANs.

Learning capsule: A history of sequential modeling

Learning capsules: Learn more about the Transformer technique.

Open source GitHub project: Train your own Transformer-XL based model.

Model parameter options for the Transformers technique

To create unique sounding musical creations, you can modify the available inference hyperparameters.

In the classic music studio experience these are called Advanced parameters, and in the AWS DeepComposer Music studio experience they are called Transformers parameters. These parameters

(24)

Model parameter options for the Transformers technique

control how your input track is modified. These parameters can be broadly categorized in three different groups.

Group 1: Inference parameters

Modifying these parameters directly affects how inference is performed on your input melody. As mentioned previously, during model training, the musical inputs are converted into tokens. The sum of available tokens represents the total musical knowledge learned during training. Contained within each token is also a probability.

Sampling technique

The Transformers technique in AWS DeepComposer supports three different sampling techniques.

The sampling technique determines how the new notes in the melody are chosen.

TopK: The next note is chosen by limiting the list of next available notes based on the value selected for Sampling threshold. Then, the next note is chosen from that new list.

Nucleus: The next note is chosen by limiting the list of next available notes based on the value selected for Sampling threshold. The value set for the Sampling threshold represents the maximum allowable cumulative sum of the token’s individual probabilities when ranked greatest to least. Then, the next note is chosen from the new list of available tokens.

Random: Unlike the previous two techniques, when Random is selected, the list of available tokens isn’t modified. Instead, the model can choose from any available note at any point while inference is being performed.

Sampling threshold

The sampling threshold sets the number of available notes that the model can choose during inference. The value selected changes based on the Sampling technique selected. When the Random technique is selected, this parameter is not available.

Creative risk

Increasing this value allows the model to deviate from the music it was trained on, and the generated music sounds more experimental.

To help you better understand how these different model parameter options work together, you can read through the following two examples.

Example 1: Setting the Sampling technique equal to TopK and the Sampling threshold equal to 0.80

This sampling technique uses the sum of available tokens learned during training to predict an upcoming note. When a new note needs to be predicted, the total number of tokens are ranked numerically from greatest to least based on their probability at that moment. When you modify the Sampling threshold, you are changing the number of notes from which the model can choose.

For example, the model that AWS DeepComposer uses, TransformerXLClassical, learned 310 tokens during training. Setting the Sampling threshold to 0.80 means that the model can randomly choose from, 310 tokens x 0.80, the top 248 tokens during inference. Setting the Sampling threshold to values closer to the maximum input value (0.99) means that the model has a greater chance of choosing lower- probability tokens. Setting the values close to the minimum input value (0.1) means that the model is more restricted to higher-probability tokens.

Example 2: Setting the Sampling technique equal to Nucleus and the Sampling threshold equal to 0.96

This sampling techniques uses the probabilities associated with the tokens to predict the upcoming note. When a new note needs to be predicted, all 310 tokens are ranked from greatest to least using

(25)

How the Transformers technique works with other generative techniques in the music studio

their probabilities. When you modify the Sampling threshold, you are setting the threshold equal to the maximum allowable cumulative sum of the ranked probabilities.

For example, imagine at the top of your descending list of token probabilities are the following five probabilities: [0.4, 0.3, 0.2, 0.05, 0.05]. If you take the cumulative sum of these probabilities, you end up with: [0.4, 0.7, 0.9, 0.95, 1.0]. In this case, each probability represents a note, which is represented by a token. Setting the Sampling threshold to 0.96 means that, at that moment, the model can pick a note randomly from this remaining list of partially summed probabilities: 0.4, 0.7, 0.9, 0.95]. They represent the original list of ranked probabilities of [0.4, 0.3, 0.2, 0.05]. So, in the moment, the model can pick from two higher-probability notes, 0.4 and 0.3, a slightly lower-probability note of 0.2, and a low-probability note, 0.05.

Group 2: Time added

These parameters tell the model how much new input track it should attempt to generate and what portion of that track should be used during inference.

Input duration

This parameter selects the portion of your track, counting in seconds from the end, that should be used for inference.

Track extension duration

This parameter selects the amount of time, in seconds, the model will attempt to generate.

Group 3: Removing musical artifacts

During inference, the Transformers model can create musical artifacts. Both of the following parameters can help remove long periods of silence or moments when a note is being held for an unexpectedly long period of time.

Maximum rest time

Silence is compressed when this value is exceeded.

Maximum note length

Held notes are compressed when this value is exceeded.

How the Transformers technique works with other generative techniques in the music studio

Use the Transformers technique as the last step or the only step in your music creation process. To use the AR-CNN technique with the Transformers technique, you must start with the AR-CNN technique.

Because the Transformers technique extends your input melody, the output is not compatible with the GANs technique.

Performing inference with the Transformers technique

To get started with the Transformers technique, we recommend using one of the Sample melodies, specifically one Recommended for the Transformers technique. These options represent the complex classical melodies that work best with the model. After selecting your input melody, you can create your first composition by choosing Extend input melody. The model extends your input melody by up to 30

(26)

Performing inference with the Transformers technique

seconds. Similar to when you work with the AR-CNN technique, you can, after performing inference, use the Edit melody (p. 23) tool to add or remove notes. Or you can change the pitch or the length of notes in the extension that was generated.

Unlike the AR-CNN technique, the Transformers technique doesn't modify the changes that you make to the input melody when you perform inference again. Making changes to the input melody influences the extension that is generated by the Transformers technique.

Using the Edit melody tool with the Transformers technique in the AWS DeepComposer Music studio

You can find the Edit melody tool on the Input track, Inference output, and Next steps pages.

To edit your melody in the remixed music studio experience

1. Choose Edit melody.

2. On the Edit melody page, you can edit your track in the following ways:

• Choose (double-click) a cell to add or remove notes.

• Drag a cell up or down to change the pitch of a note.

• Drag the edge of a cell left or right to change the length of a note.

3. To listen to your changes, choose Play (▶).

4. When you have finished, choose Apply changes.

Edit melody changes are not saved until inference is performed again.

To save these changes prior to to performing inference again, choose Download melody.

Using the Edit melody tool with the Transformers technique in the classic music studio

You can find the Edit melody tool on the landing page.

(27)

Performing inference with the Transformers technique

To edit your input melody

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Use the classic music studio.

3. To open the Input melody section, choose the right arrow (▶).

4. Under Source of input melody, choose Sample melody, Custom recorded melody, or Imported track.

5. Choose Edit melody.

6. On the Edit melody page, you can edit your track in the following ways:

• Choose (double-click) a cell to add or remove notes.

• Drag a cell up or down to change the pitch of a note.

• Drag the edge of a cell left or right to change the length of a note.

7. To listen to your changes, choose Play (▶).

8. When you have finished, choose Apply changes.

Edit melody changes are not saved until inference is performed again.

To save these changes prior to to performing inference again, choose Download melody.

(28)

Using a sample melody

Creating a composition with a trained model using an AWS DeepComposer Music studio experience

To generate, create, and edit compositions with AWS DeepComposer, you use the AWS DeepComposer music studio. To get started, you need a trained model and an input track.

For the model, you can use either a sample or a custom model. This topic covers how to use a sample model. Sample models are available in both AWS DeepComposer music studio experiences.

For the input track, you can use a sample track, record a custom track, or import a track.

Each AWS DeepComposer music studio experience supports three different generative AI techniques, generative adversarial networks (GANs) (p. 3), autoregressive convolutional neural network (AR- CNN) (p. 1), and Transformers (p. 4). You can use the GANs technique to create accompaniment tracks.

You can use the AR-CNN technique to modify notes in your input track. You can use the Transformers technique to extend your input track by up to 30 seconds.

To learn more about how to use the different generative techniques together, see the Generative techniques in AWS DeepComposer (p. 13) topic. The topic covers how to collaborate interactively with the available generative techniques in AWS DeepComposer. You can also learn how to best use the different techniques together.

In each of the following topics, you can find directions for using either AWS DeepComposer Music studio experience.

Topics

• Using a sample input melody to create a composition (p. 24)

• Recording a custom melody to create a composition (p. 26)

• Using an imported track to create a composition in AWS DeepComposer music studio (p. 28)

Using a sample input melody to create a composition

In this topic you can learn how to use a sample input melody and a sample model to create your first composition in under five minutes. Using a sample input track is the quickest way to get started with AWS DeepComposer. The following procedures will work with any sample or previously trained custom model.

The AWS DeepComposer music studio experiences are a great place to experiment and play. You can start by choosing a different generative AI technique to use with your sample input track or use the different techniques collaboratively to create your next musical masterpiece.

(29)

AWS DeepComposer Music studio

To learn more about how you can use the different generative techniques together, see the Generative techniques in AWS DeepComposer (p. 13) topic.

Topics

• Generating a composition using the AWS DeepComposer Music studio (p. 25)

• Generating a composition using the classic music studio experience (p. 25)

Generating a composition using the AWS DeepComposer Music studio

In this topic you will learn how to use the sample input track and model to create a new composition in AWS DeepComposer.

To generate a composition with sample input track

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Music studio.

3. To get started, choose Start composing.

4. On the Input track page, under Choose an input track, choose the down arrow (▼).

5. Choose Ode to Joy.

6. Choose Continue.

7. On the ML technique page, choose AR-CNN.

8. Choose Continue.

9. On the Inference output page, you can do the following:

• Change the AR-CNN parameters, choose Enhance again, and then choose Play to hear how your track has changed.

• Choose Edit melody to modify and change the notes that were added during inference.

Important

Each time you perform one of the preceding modifications, your composition is automatically save as a new composition.

10. Choose Continue to finish creating your composition in the remixed music studio.

After creating your first few compositions, you can start to experiment by using different generative AI techniques, and the available editing tools in AWS DeepComposer. For more details, see Generative techniques in AWS DeepComposer (p. 13) and Editing music with AWS DeepComposer (p. 37) in the AWS DeepComposer developer guide.

Generating a composition using the classic music studio experience

In this topic you will learn how to use the sample input track and model to create a new composition using the classic music studio in AWS DeepComposer.

To generate a composition with a sample input melody.

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Use the classic music studio.

(30)

Recording a custom melody

3. To open the Input melody section, choose the right arrow (▶).

4. Choose the down arrow (▼) to open the Sample track menu.

5. Choose Ode to Joy.

6. Under Model parameters, for Generative AI technique, choose AR- CNN.

7. Choose Enhance input melody.

After inference is complete, you can do the following:

• Change the Advanced parameters, choose Enhance input melody , and then choose Play to hear how your track has changed.

• Choose Edit melody to modify and change the notes that were added during inference.

Important

Each time you perform one of the preceding modifications, your composition is automatically save as a new composition.

8. To listen to your new composition, choose Play (►).

After creating your first few compositions you can start to experiment by using the digital keyboard to record your own music, or importing your own track. Additionally, you can use the available editing tools in AWS DeepComposer to improve your musical creations. You can also experiment with the different available generative techniques. For more information, see Generative techniques in AWS DeepComposer (p. 13) and Editing music with AWS DeepComposer (p. 37) in the AWS DeepComposer developer guide.

Recording a custom melody to create a composition

To record a custom input melody, you can use the AWS DeepComposer built-in virtual keyboard (p. 5) or a AWS DeepComposer keyboard.

The AWS DeepComposer Music studio experiences allow you to explore and play with different supported generative AI techniques. You can try using different generative AI techniques with your custom recording. The different generative AI techniques can be used together. To learn more, see the topic ongenerative techniques in AWS DeepComposer (p. 13) in the AWS DeepComposer Developer guide.

Topics

• Recording an input track using the AWS DeepComposer Music studio (p. 26)

• Recording a melody using the classic music studio (p. 26)

Recording an input track using the AWS DeepComposer Music studio

Recording a melody using the classic music studio

To make recording a melody easier, AWS DeepComposer supports several features. To find them, use the Settings icon (#) located on the music studio landing page. Choose the icon to activate, or deactivate, from the following settings:

(31)

Classic music studio

Metronome turns on or off a metronome that ticks while you record your melody. After turning on the metronome, use the slider on the music studio console to adjust the speed.

Hot keys enables the use of your computer keyboard for recording your melody.

Countdown provides five seconds of lead-in time before recording begins so that you can prepare for recording.

To record a custom melody and use it to create a composition

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Use the classic music studio.

3. Choose Record (●).

If you need a little inspiration, try recording this melody.

4. When you’ve finished, choose Stop (■).

5. (Optional) Choose Rhythm assist.

Rhythm assist can be used to automatically correct the timing of notes. Use it when your melody contains the right notes but isn't consistently in time with the beat. This can help the generative algorithm create more realistic sounding music.

6. To listen to your new recording, choose Play (►).

7. (Optional) To fix notes that sound out place or to add notes that you missed while recording, choose Edit melody.

8. In the Model parameters section, for Generative AI technique, choose AR-CNN.

9. Choose Enhance input melody.

10. (Optional) After inference is finished, you can do the following:

• Choose Enhance again, and then choose Play to hear how your track has changed.

• Choose Edit melody to modify and change the notes that were added during inference.

Important

Each time you perform one of the preceding modifications, your composition is automatically save as a new composition.

11. To listen to your new generative AI musical composition, choose Play (►).

After creating your composition, you can use the Edit melody tool to add or remove notes. You can also use the Pitch and Tempo tools to change the way your composition sounds. You can also

(32)

Importing a melody

start to experiment with using the different supported generative algorithms together. For more information, see Editing tool in AWS DeepComposer (p. 37) and Generative techniques in AWS DeepComposer (p. 13) in the AWS DeepComposer Developer guide.

Using an imported track to create a composition in AWS DeepComposer music studio

You can use the AWS DeepComposer music studio to import your own musical track. You can import tracks that are saved as .midi files and are less than 10 KB. To successfully import a track, it must first be saved locally on your machine.

If you import a track containing multiple instrumental tracks in it, each individual track is merged into a single track. Also, if your imported track is longer than eight bars in 4/4 time then only the first eight bars will be added to the AWS DeepComposer music studio.

Note

You certify that you own all necessary rights to any content you import and you acknowledge and agree that you will not use AWS DeepComposer to violate or infringe the intellectual property rights of others.

Topics

• Importing a track in the AWS DeepComposer Music studio (p. 28)

• Importing a track in the classic music studio experience (p. 29)

Importing a track in the AWS DeepComposer Music studio

In AWS DeepComposer Music studio you can import your track on the Input track page. To use this procedure, make sure that your track is saved locally on your machine.

To import a track and use it to create a composition

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Use the classic music studio.

3. Choose Start composing.

4. On the Input track page, under Choose an input track, choose the down arrow (▼).

5. Choose Import a track

6. In the Import a track dialog box, choose Choose a file. Then use the file explorer on your computer to select and upload your file.

7. Choose Save.

8. Choose Continue.

9. On the ML technique page, choose AR-CNN.

10. Choose Continue. AWS DeepComposer performs inference to create a new composition.

11. On the Inference output page, you can do the following:

• Change the AR-CNN parameters, choose Enhance again to perform inference again, and then choose Play to hear how your track has changed.

• Choose Edit melody to modify and change the notes that were generated during inference.

(33)

Classic music studio

Important

Each time you perform one of the preceding modifications, your composition is automatically save as a new composition.

12. When you finished, choose Continue.

To learn more, explore the generative techniques in AWS DeepComposer (p. 13) topic in the AWS DeepComposer Developer guide. This topic explains how you can work more collaboratively with the available generative techniques.

Importing a track in the classic music studio experience

AWS DeepComposer supports importing tracks that are saved as .midi files and are less than 10 KB. To use this procedure, make sure you have already saved your input track to your local machine.

To import a track and use it to create a composition

1. Open the AWS DeepComposer console.

2. In the navigation pane, choose Use the classic music studio.

3. To open the Input melody section, choose the right arrow (▶).

4. Change Source of input melody to Imported track.

Note

If you import a track longer than eight bars, only the first eight bar will be imported.

If your imported melody contains multiple tracks, they will be automatically merged into a single track.

5. To import your track, choose Choose file.

6. Under Model parameters, for Generative AI technique, choose AR-CNN.

7. Choose Enhance input melody.

After inference is complete, you can do the following:

• Change the Advanced parameters, choose Enhance input melody to perform inference again, and then choose Play to hear how your track has changed.

• Choose Edit melody to modify and change the notes that were generated during inference.

Important

Each time you perform one of the preceding modifications, your composition is automatically save as a new composition.

8. To listen to your new musical composition created with generative AI, choose Play (►).

To learn more, explore the generative techniques in AWS DeepComposer (p. 13) topic in the AWS DeepComposer Developer guide. This topic explains how you can work more collaboratively with the available generative techniques.

(34)

Key words and phrases

Training and evaluating generative AI models in AWS DeepComposer

By examining trained models, you can learn what's a useful model and what features that a model should include. Always evaluate a model to understand the predictions that it generates. To evaluate a model, you can examine the changes in the loss function of your model over time. You can also explore the training output per 50th epoch on the model details page. This topic covers what makes an effective model and which hyperparameters are available for different models.

Important

This topic assumes that you chose the hyperparameters documented in the topic on training a custom MuseGAN model (p. 10). If you chose another model or different hyperparameters, your results will differ from those shown in this topic.

Topics

• Key words and phrases (p. 30)

• Evaluating the MuseGAN jazz sample model (p. 31)

• Evaluating a custom model (p. 32)

Key words and phrases

Before examining models, review the following terms and definitions. The full list of available terms is available in the topic on AWS DeepComposer concepts and terminology (p. 1).

discriminator

A classifier model, which is one part of a generative adversarial network (GAN). The discriminator classifies real data from generated data. In the AWS DeepComposer use case, this model tries to determine if a generated piano roll looks like a real piano roll or an artificially created piano roll image. The discriminator is trained on real data.

epoch

One complete pass through the training dataset by the neural network. For example, if you have 10,000 music tracks in the training dataset, one epoch represents one pass through all 10,000 tracks. The number of epochs required for a model to converge varies based on the training data. An iterative algorithm converges when the loss function stabilizes.

generator

One part of a GAN. The generator creates new data by collecting and incorporating feedback from the discriminator. A GAN is made up of two models: a generator and a discriminator. Both have separate loss functions. The goal of the generator is to create the most accurate data possible. The goal of the discriminator is to determine whether that data is accurate.

learning rate

A training hyperparameter that controls how large the step size is at each iteration and update. Step size is how much model weights and parameters change. A small learning rate requires more epochs because smaller changes are made to each update. A larger learning rate results in rapid changes.

A learning rate that is too large can cause the model to converge too quickly and pass the optimal point. A learning rate that is too small can cause the training process to get stuck before reaching the optimal point.

參考文獻

相關文件

You need to act now plant it in your heart The simple fact of how we can do our part For future generations. Step up and make

MR CLEAN: A Randomized Trial of Intra-arterial Treatment for Acute Ischemic Stroke. • Multicenter Randomized Clinical trial of Endovascular treatment for Acute ischemic stroke in

Once you get down to a purely business level, your influence is gone and the true light of your life isdimmed. You must work in the missionary spirit, with a breadth of charity

You need to configure DC1 to resolve any DNS requests that are not for the contoso.com zone by querying the DNS server of your Internet Service Provider (ISP). What should

The broken teapots have been kept aside ______ you need them to support a claim on your suppliers

• To the right of the Draw mode buttons you find push buttons through which you can access all the functions that you need to define and solve the PDE problem: define

You are given the desired boiling point of an ethylene glycol solution containing 1.0 kg of water and asked to find the mass of ethylene glycol you need to add to achieve the

Your problem may be modest, but if it challenges your curiosity and brings into play your inventive faculties, and if you solve it by your own means, you may experience the tension