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] What is the best implementation of neural style transfer in Ubuntu?

Per this discussion: https://www.reddit.com/r/MachineLearning/comments/8o846n/d_what_is_the_best_implementation_of_neural_style/

I’m wondering if there has been any updates.

The consensus seems to be that Jcjohnson still reigns king… However, people found ways to speed it up (https://github.com/lengstrom/fast-style-transfer), clean it up (https://github.com/chuanli11/CNNMRF), or combine speed, quality and effectiveness (https://arxiv.org/pdf/1812.05233.pdf).

I see there have been some repos where people pulled or forked to create their own. I’m hesitant to approach these for their lack of comments/support.

I’ve personally experimented with Jcjohnson and cysmith (https://github.com/cysmith/neural-style-tf) with many happy results. But I’m wondering if people have had luck with others that I’ve missing.

Ultimately, I’m looking for a method that can provide accurate style transfers with minimum artifacts (time is less of a priority) with video capabilities. I have a rig with 2 x GTX 1070 running ubuntu 16.04 LTS.

Cheers.

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

[D] My own interesting game problem (ML, DP, PP etc — I’m unsure)

Looking for possible approaches or solutions to my below game problem. I believe it to be some sort of dynamic programming, machine learning, or probabilistic programming challenge, but am unsure. This is my original problem, and is part of a corporate challenge to create “unique and challenging problem that you’re able to conceptualize and then solve. 3 Judging criteria: uniqueness, complexity, and solution (no particular weighting and scoring may favor uniqueness/challenge over solution” — pretty sure the company is trying to do some sort of Ex Machina challenge/reward type of thing.

Inspirations: Conway’s Game of Life, DeepMind’s Starcraft Challenge, deep Q-learning, probabilistic programming

BEAR SURVIVAL

=======================

A bear is preparing for hibernation. A bear must reach life-strength 1000 in order to rest & survive the winter. A bear starts off at a health of 500. A bear explores an environment of magic berries. A bear makes a move (chosen randomly with no optional direction) and comes across a berry each time. There are 100 different types of berries that all appear across the wilderness equally and infinitely.

A magic berry always consumes 20 life from the bear upon arrival. A bear may then choose to give more, all, or none of its remaining life to the berry. If eaten, the berry may provide back to the bear 2x the amount of life given. Berries, however, are not the same and a bear knows this. A bear knows that any berry has some percentage of being poisonous. Of the 100 different types of berries, each may be 0%-100% poisonous. A berry that is 0% poisonous is the perfect berry and a bear knows that it should commit all of its remaining life to receive max health gain. If a bear wants to eat the berry, it must commit at least 20 more health. Again, a bear does not have to eat the berry, but if it chooses not to, it walks away and does not get the original 20 back.

Example: On a bear’s first move (at 500 life), it comes across a magic berry and the berry automatically takes 20 life. The bear notices that the berry is 0% poisonous, the perfect berry, and gives its remaining 480 health, eats the berry, and then receives 1000 health gain. The bear has reached it’s goal, hibernates, and wins the game. However, if that first berry was 100% poisonous, the anti-berry, and the bear committed all of its remaining life it would’ve received back 0 health gain, died, and lost the game. A bear knows to never eat the anti-berry. It knows it can come across any poisonous value from 0-100 (3,25,52,99, etc).

A bear must be picky & careful, but also bold & smart about how much life it wants to commit per berry, per move. A bear knows that if it never eats, it will eventually die as it loses 20 health per berry, per move.

While it’s important for an individual bear to survive, it is even more important for the bear population to not go extinct. A population is going extinct if they lose over half of the population that year.

Questions:

  1. May we find a bear’s optimal strategy for committing health & eating berries to reach 1000 health gain?
  2. Is the bear population eventually doomed to a unfavorable environment?

**Bonus Complexity:**Winter is coming, and conditions grow progressively harsher over time. A bear knows that every 10 moves, each berry will consume 20 * (fib(i)/ environmentFactor). fib(i) stands for fibonacci-sequence at index i, starting at 1. For all indexes where the progression is less than 20, a berry’s initial health consumption remains at 20. environmentFactor is a single environment’s progressive-harshness variable (how harsh winter becomes over time). The bear population is currently in an environment with environmentFactor of 4. Spelled out:

Moves 01-10: Berries consume 20 — 20*(1/4)

Moves 10-20: Berries consume 20 — 20*(1/4)

Moves 20-30: Berries consume 20 — 20*(2/4)

Moves 30-40: Berries consume 20 — 20*(3/4)

Moves 40-50: Berries consume 25 — 20*(5/4)

Moves 50-60: Berries consume 40 — 20*(8/4)

Moves 60-70: Berries consume 65 — 20*(13/4)

Moves 70-80: Berries consume 105 — 20*(21/4)

Moves 80-90: Berries consume 170 — 20*(34/4)

Moves 90-100: Berries consume 275 — 20*(55/4)

Moves 100-110: Berries consume 445 — 20*(89/4)

… and so on …

Same questions as above, with a third: if this environment is proven unfavorable, and extinction unavoidable, what maximum environment/environmentFactor must the bear population move to in order to avoid extinction? (this may or may not exist if a berry’s requirement of 20 initial life is always unfavorable without any progression).

Updates/Questions:

QUESTION: Can you give an example of what happens when a bear eats a semi-poisonous berry (e.g. 20%)?

– Also, is the bear always immediately aware of the poison value of berries?

– In this, it also seems like you’re using health, life, strength, life-strength, health-gain, etc interchangeably. Are they all the same thing?

ANSWER: if the bear eats the poison berry of 20%, then it becomes a probability > problem of whether or not the berry provides back life or keeps the health amount committed by the bear. Example: the bear is at 400, the next move & berry take the initial 20 (bear is at 380 now), the bear decides to commit an additional 80 (now at 300) and eat the berry. 8/10 times the berry will return to the bear 200 (2x 100 committed — bear ends turn at 500), 2/10 times the berry returns nothing and the bear must move on with 300 life.

– the bear is always immediately aware of the poison value of a berry.

– life/health/strength are all the same thing.

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

[D] How the Transformers broke NLP leaderboards

I came across this interesting article about whether larger models + more data = progress in ML research.

How the Transformers broke NLP leaderboards

Excerpt:

The focus of this post is yet another problem with the leaderboards that is relatively recent. Its cause is simple: fundamentally, a model may be better than its competitors by building better representations from the available data – or it may simply use more data, and/or throw a deeper network at it. When we have a paper presenting a new model that also uses more data/compute than its competitors, credit attribution becomes hard.

The most popular NLP leaderboards are currently dominated by Transformer-based models. BERT received the best paper award at NAACL 2019 after months of holding SOTA on many leaderboards. Now the hot topic is XLNet that is said to overtake BERT on GLUE and some other benchmarks. Other Transformers include GPT-2, ERNIE, and the list is growing.

The problem we’re starting to face is that these models are HUGE. While the source code is available, in reality it is beyond the means of an average lab to reproduce these results, or to produce anything comparable. For instance, XLNet is trained on 32B tokens, and the price of using 500 TPUs for 2 days is over $250,000. Even fine-tuning this model is getting expensive.

Wait, this was supposed to happen!

On the one hand, this trend looks predictable, even inevitable: people with more resources will use more resources to get better performance. One could even argue that a huge model proves its scalability and fulfils the inherent promise of deep learning, i.e. being able to learn more complex patterns from more information. Nobody knows how much data we actually need to solve a given NLP task, but more should be better, and limiting data seems counter-productive.

On that view – well, from now on top-tier NLP research is going to be something possible only for industry. Academics will have to somehow up their game, either by getting more grants or by collaborating with high-performance computing centers. They are also welcome to switch to analysis, building something on top of the industry-provided huge models, or making datasets.

However, in terms of overall progress in NLP that might not be the best thing to do. The chief problem with the huge models is simply this:

“More data & compute = SOTA” is NOT research news.

If leaderboards are to highlight the actual progress, we need to incentivize new architectures rather than teams outspending each other. Obviously, huge pretrained models are valuable, but unless the authors show that their system consistently behaves differently from its competition with comparable data & compute, it is not clear whether they are presenting a model or a resource.

Furthermore, much of this research is not reproducible: nobody is going to spend $250,000 just to repeat XLNet training. Given the fact that its ablation study showed only 1-2% gain over BERT in 3 datasets out of 4, we don’t actually know for sure that its masking strategy is more successful than BERT’s.

At the same time, the development of leaner models is dis-incentivized, as their task is fundamentally harder and the leaderboard-oriented community only rewards the SOTA. That, in its turn, prices out of competitions academic teams, which will not result in students becoming better engineers when they graduate.

Entire article:

https://hackingsemantics.xyz/2019/leaderboards/

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

[P] Going with the Flow: An Introduction to Normalizing Flows

Recently I made a tutorial on Normalizing Flows (NFs). We cover the advantages of using NFs, the theory which makes them work and we also implement a flow in PyTorch!

Normalizing Flows are part of the generative model family and are beginning to gain more and more attention due to advantages over other generative models.

I thought I would share it since it may be helpful to others learning the subject!

https://gebob19.github.io

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

[Discussion] Would it be possible for the NSA to use machine learning to determine when a whistleblower is about to leak?

Could they use datasets acquired by collecting their employees social media activity, movement, phone calls, voice recordings, facial recognition, purchases to determine the probability of a potential whistleblower in their organization and intercept before said action took place?

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