Skip to main content

Blog

Learn About Our Meetup

5000+ Members

MEETUPS

LEARN, CONNECT, SHARE

Join our meetup, learn, connect, share, and get to know your Toronto AI community. 

JOB POSTINGS

INDEED POSTINGS

Browse through the latest deep learning, ai, machine learning postings from Indeed for the GTA.

CONTACT

CONNECT WITH US

Are you looking to sponsor space, be a speaker, or volunteer, feel free to give us a shout.

Author: torontoai

[D] Model compression for generative models (GAN, VAE, Autoregressive, etc)

Are there works that investigate VAE and GAN quality, disentanglement, latent variables under model compression constraints? (activations and weights are pruned/sparsed, quantization, distillation, etc)

I can’t seem to find one that apply compression on GANs and VAEs (Exceptions include Parallel WaveNet which do use distillation, but that is because otherwise they can’t get convergence)
Last time we got denoising autoencoders and sparse autoencoders…

submitted by /u/tsauri
[link] [comments]

[P] Need help with Image Captioning

Hello I’m trying to learn CNNs and I’ve hit a deadend with an Image Captioning project I was working on for fun.

Dataset: 10k images from Google Conceptual Captions

Tutorial I’m mostly following: Automatic Image Captioning

One difference between my dataset and the Flicker8k dataset in the tutorial is that my dataset only has one caption per image but latter has five captions per image.

The problem is that I am getting the same caption for nearly all images. I have tried to use: – LSTM instead of GRU cells – 50 and 200 Glove word embeddings. I even tried to create my own embeddings using all captions in the dataset – beam search and greedy search to get a prediction

What do I do?

submitted by /u/plmlp1
[link] [comments]

Tiling and Randomizing Images as a Stopgap for Visual Data Shortage [D]

Hi there,

This is my first post and, as a beginner, I don’t yet have the vocabulary to totally articulate my thoughts on this and I apologize in advance for that.

I’m currently interested in training a convolutional neural network to recognize images. However, a problem I’m encountering is a lack of source images so I thought, why not throw the few images I have into some program that could cut them up into tiles and shuffle them around randomly?

Upon further reading, it seems like this is – or is at least similar to – a preestablished method for synthesizing new visual data called Structured Domain Randomization.

My question: is this a valid method for training my neural network?

I’m worried that the algorithm wouldn’t actually be learning anything new since the structures present within each image will remain the same, only their location within the image will change.

Thank you!

submitted by /u/LFOwen
[link] [comments]

Build your own real-time voice translator application with AWS services

Just imagine—you say something in one language, and a tool immediately translates it to another language. Wouldn’t it be even cooler to build your own real-time voice translator application using AWS services? It would be similar to the Babel fish in The Hitchhiker’s Guide to the Galaxy:

“The Babel fish is small, yellow, leech-like—and probably the oddest thing in the universe… If you stick one in your ear, you can instantly understand anything said to you in any form of language.”

Douglas Adams, The Hitchhiker’s Guide to the Galaxy

In this post, I show how you can connect multiple services in AWS to build your own application that works like a bit like the Babel fish.

About this blog post
Time to read 15 minutes
Time to complete 30 minutes
Cost to complete Under $1
Learning level Intermediate (200)
AWS services Amazon Polly, Amazon Transcribe, Amazon Translate, AWS Lambda, Amazon CloudFront, Amazon S3

Overview

The heart of this application consists of an AWS Lambda function that connects the following three AI language services:

  • Amazon Transcribe — This fully managed and continuously trained automatic speech recognition (ASR) service takes in audio and automatically generates accurate transcripts. Amazon Transcribe supports real-time transcriptions, which help achieve near real-time conversion.
  • Amazon Translate — This neural machine-translation service delivers fast, high-quality, and affordable language translation.
  • Amazon Polly — This text-to-speech service uses advanced deep learning technologies to synthesize speech that sounds like a human voice.

A diagrammatic representation of how these three services relate is shown in the following illustration.

To make this process a bit easier, you can use an AWS CloudFormation template, which initiates the application. The following diagram shows all the components of this process, which I later describe in detail.

Here’s the flow of service interactions:

  1. Allow access to your site with Amazon CloudFront, which allows you to get an HTTPS link to your page and which is required by some browsers to record audio.
  2. Host your page on Amazon S3, which simplifies the whole solution. This is also the place to save the input audio file recorded in the browser.
  3. Gain secure access to S3 and Lambda from the browser with Amazon Cognito.
  4. Save the input audio file on S3 and invoke a Lambda function. In the input of the function, provide the name of audio file (that you saved earlier in Amazon S3), and pass the source and target language parameters.
  5. Convert audio into text with Amazon Transcribe.
  6. Translate the transcribed text from one language to another with Amazon Translate.
  7. Convert the new translated text into speech with Amazon Polly.
  8. Save the output audio file back to S3 with the Lambda function, and then return the file name to your page (JavaScript invocation). You could return the audio file itself, but for simplicity, save it on S3 and just return its name.
  9. Automatically play the translated audio to the user.
  10. Accelerate the speed of delivering the file with CloudFront.

Getting started

As I mentioned earlier, I created an AWS CloudFormation template to create all the necessary resources.

  1. Sign into the console, and then choose Launch Stack, which launches a CloudFormation stack in your AWS account. The stack launches in the US-East-1 (N. Virginia) Region.
  2. Go through the wizard and create the stack by accepting the default values. On the last step of the wizard, acknowledge that CloudFormation creates IAM After 10–15 minutes, the stack has been created.
  3. In the Outputs section of the stack shown in the following screenshot, you find the following four parameters:
    • VoiceTranslatorLink—The link to your webpage.
    • VoiceTranslatorLambda—The name of the Lambda function to be invoked from your web application.
    • VoiceTranslatorBucket—The S3 bucket where you host your application, and where audio files are stored.
    • IdentityPoolIdOutput—The identity pool ID, which allows you to securely connect to S3 and Lambda.
  4. Download the following zip file and then unzip it. There are three files inside.
  5. Open the downloaded file named voice-translator-config.js, and edit it based on the four output values in your stack (Step 3). It should then look similar to the following.
    var bucketName = 'voicetranslatorapp-voicetranslat……';
    var IdentityPoolId = 'us-east-1:535…….';
    var lambdaFunction = 'VoiceTranslatorApp-VoiceTranslatorLambda-….';

  6. In the S3 console, open the S3 bucket (created by the CloudFormation template). Upload all three files, including the modified version of voice-translator-config.js.

Testing

Open your application from the link provided in Step 3. In the Voice Translator App interface, perform the following steps to test the process:

  1. Choose a source language.
  2. Choose a target language.
  3. Think of something to say, choose START RECORDING, and start speaking.
  4. When you finish speaking, choose STOP RECORDING and wait a couple of seconds.

If everything worked fine, the application should automatically play the audio in the target language.

Conclusion

As you can see, it takes less than an hour to create your own unique voice translation application, based on the existing, integrated AI language services in AWS. Plus, the whole process is done without a server.

This application currently supports two input languages: US English and US Spanish. However, Amazon Transcribe recently started supporting real-time speech-to-text in British English, French, and Canadian French. Feel free to try to extend your application by using those languages.

To see the source code of the app (including the Lambda function written in JavaScript), you can find it in the voice-translator-app GitHub repo. In addition to using the browser to record your voice, I also used this recorder.js script by Matt Diamond.


About the Author

Tomasz Stachlewski is a Solutions Architect at AWS, where he helps companies of all sizes (from startups to enterprises) in their cloud journey. He is a big believer in innovative technology, such as serverless architecture, which allows companies to accelerate their digital transformation.

 

 

 

 

[D] Costs of Deep Learning

Latest DL language models such as Groover ( https://arxiv.org/abs/1905.12616 ) costs up to 600k USD just for training the final model. At the same time, training a single AI model can emit as much carbon as five cars in their lifetimes ( https://www.technologyreview.com/s/613630/training-a-single-ai-model-can-emit-as-much-carbon-as-five-cars-in-their-lifetimes/ ).

Is this a sustainable trend especially for research labs in academia which lack funding?

submitted by /u/muwnd
[link] [comments]

[D] Best practices for interpreting 1-D convolutions

1D convolutions are often applied at the earliest layers when doing deep learning on dependent (time-series, dynamical, audio e.g. WaveNet, etc) data. Are there any best practices for interpreting the learned convolution weights? Can anyone point me to examples of good papers where the representations learned by stacked 1D-convolutions were interpreted? A signal-processing (or other established mathematical framework’s) viewpoint would be especially interesting. Thanks!

submitted by /u/satsatsat
[link] [comments]

[Discussion] What is the minimum amount of cloud computing knowledge necessary for a data scientist?

Hi All.

I am a data scientist with pretty deep domain knowledge and a broad and comprehensive knowledge of statistics and ML algorithms. I can go toe-to-toe with the best over when to use neural networks and when to use logistic regression, why the BIC is sometimes better than the AIC, which optimization algorithm is best suited for a specific optimization problem etc….

Unfortunately, my tech stack has been all on-prem and ERP tools so far. My knowledge of cloud computing amounts to knowing how to log into a cloud environment and then doing whatever I would do on a on-prem server on the cloud instead (e.g. running SQL queries in Redshit or BigQuery the same way I would run them on any Oracle or SQL Server tool, running Python scripts the same way I run them on my local machine or on a Linux box, S3 and GS are just a bunch of remote folders that you scp to and from, etc….)

I feel that I need to learn more. Most people keep telling me that I am fine, as long as I am sticking to the role of data scientist and not trying to do ML engineer or data engineer work instead, but I have a nagging feeling that there is a minimum amount of cloud computing knowledge that I should have and that I am missing.

Can anybody give me some pointers?

submitted by /u/AlexSnakeKing
[link] [comments]

[N] Keras Tuner (official hyper-parameter tuning library )

Official hyper-parameter tuning library for Keras just dropped:

https://github.com/keras-team/keras-tuner

Early days, but it provides a simple way to do hyper-parameter tuning in Keras.

Teaser Slides from Google I/O 2019:

https://elie.net/static/files/cutting-edge-tensorflow-keras-tuner-hypertuning-for-humans/cutting-edge-tensorflow-keras-tuner-hypertuning-for-humans-slides.pdf

submitted by /u/tlkh
[link] [comments]