Professional Documents
Culture Documents
Codeless Deep Learning For Language Modeling and Image Classification
Codeless Deep Learning For Language Modeling and Image Classification
Corey Weisinger
Corey.Weisinger@knime.com
Rosaria Silipo
Rosaria.Silipo@knime.com
KNIME Community
Integrations Extensions
KNIME
Open Source
Analytics Platform
KNIME Partner
Extensions Extensions
KNIME Server
Neuron Networks
𝑥
𝑤 𝑏
∑0,8σ 𝑎 = 𝜎(𝑥 𝑤 + 𝑥 𝑤 + 𝑏)
𝑤
𝑥
𝑤 , 𝑤
𝑤 ,
,
𝑏 𝑏
𝑤 ,
∑ 𝑤 , ∑
𝑤 ,
𝑤 , 𝑤 ,
𝑤 , 𝑏
∑
∑ ∑
• Problems:
∑ σ
– Each time step is completely independent ∑ σ
– For translations we need context ∑ σ
– More general: we need a network that 𝑥 ∑ σ ∑σ 𝑦
remembers inputs from the past ∑ σ
∑ σ
∑ σ
• Solution: Recurrent neural networks
Input x Output y
Ich I
mag like
Schokolade chocolate
𝟐 𝟑
𝒙 𝒚
∑ ∑
𝟐 𝟑
𝒙 𝒚
∑ ∑ ∑
∑ ∑
𝟑 𝟑 𝟑 𝟑
𝒚 𝒚 𝒚 𝒚
∑ ∑ ∑ ∑
∑ ∑ ∑ ∑
∑ ∑ ∑ ∑
𝟐 𝟐 𝟐 𝟐
𝒙 𝒙 𝒙 𝒙
Many to Many
Ich gehe gerne segeln
A A A A A A A A A A
I like to go sailing
Language classification
Text classification Image captioning
© 2020 KNIME AG. All Rights Reserved. 24
How can we train a recurrent neural network for text generation
0,0,0,0,0,0,1,0,0, ... , 0
u
0,0,0,0,0,0,0,1,0, ... , 0
n
M samples
0,0,0,0,1,0,0,0,0, ... , 0
t
0,0,0,0,0,0,0,0,1, ... , 0
1,0,0,0,0,0,0,0,0, ... , 0
a B
0,1,0,0,0,0,0,0,0, ... , 0
...
k
m
n
b
z
a
softmax
linear
LSTM based Neural Network: Many to Many
33
LSTM states
o
0,0,0,0,0,0,1,0,0, ... , 0
u
M samples
t
Mount Baker
0,0,0,0,0,0,0,0,1, ... , 0
1,0,0,0,0,0,0,0,0, ... , 0
B
95 = dictionary size
The KNIME Keras Integration
https://www.knime.com/deeplearning/keras
LSTM states
© 2020 KNIME AG. All Rights Reserved. 35
Model training workflow
Advantages:
- They remind you of mountains. Do
not they?
- Sound familiar enough
- Evoke the feeling of nature
- No copyright issues
- Automatic generation in 10 seconds
- You can generate as many as you
want
- No people involved as of now
https://hub.knime.com
https://kni.me/w/mGO9nXhmjzIKiqHU
M past samples
a
b
s u o h
e
0,0,0,0,0,0,0,1,0, ... , 0
0,0,0,0,0,0,1,0,0, ... , 0
0,0,0,1,0,0,0,0,0, ... , 0
0,1,0,0,0,0,0,0,0, ... , 0
86 = dictionary size
86 = dictionary size
n
LSTM states
N
...
Dictionary size = 86
256 LSTM states z
100 past characters
Training set = 23 popular rap songs
– “King Lear”
– “Othello”
– “Much ado about nothing”
Yo!
Caro amico ti scrivo così mi distraggo un po'E
This post is about generating free text siccome sei molto lontano più forte ti scriverò.
with a deep learning network Da quella prima folla strana, che aveva preso il suo
particularly it is about Brick X6, This License refers to version of the GNU General Public License. nome, e di correre alla casa di don Abbondio, con
Phey, cabe, Copyright also means copyright-bick,
make you feel soom the way (I smoke good!)
un viso bene di non poterci andar la casa del padre
Remade me any thing to his sword
I probably make (What?) To his salt and most hidden loose to be so for sings, but not in a Cristoforo, e gli disse che s'avvicinava all'uscio, e si
More money in six months, libutt of his matter than that shall be sure as will be soldye mise a sparse di corsa, e di stare a sé, verso la
Than what's in your papa's safe (I'm serious) As master compary, do not live in traitor. strada di servizio, chiesto le parole che gli andavan
Look like I robbed a bank (Okay Okay) Bless thy five wits!
I set it off like Queen Latifah -Kent dall'altra stanza, e con la sua condizione de'
'Cause I'm living single I'm feeling cautious O pity! cappuccini, e di consigli ricerche di confidenza
I ain't scream when they served a subpoena Sir, where is the patience now, delle gride, nel suo passaggio, se non pensava con
(Can't go back to jail) That this is so far from the sea and some bidings to dismantle
So many folds of save and honest. una certa ripugnanza a casa sua, che andavano a
I heard that he a leader
(Who pood, what to be f*****' up -Brabantio scomparire in un campo di buone ragioni che
I must not think the Turk of Cassio in the strange metting the avevan potuto raccogliere i suoi pensieri, e di
The baugerout Black alro Black X6,
cribles of a charmer be the reviling of libe to say
Phantom White X6 looks like a panda That I can deceive him to the best advantage, sopra non senza interrogare, che la sua avventura
Goin' out like I'm Montana In her prophetic fairs of a little to presently at your powers; aveva fatto predicare, e con la forza d'un fatto
Hundred killers, hundred hammers Black X6, whereof I thank you, sir.
Phantom White X6, panda
come fuggitive che aveva preso il suo nome, e di
-Albany
Pockets swole, Danny Gloucester, I will prove upancy of his sport and first accuriors and correre alla casa di don Abbondio, con un
Sellin' bar, candy guard and talking on the white. cappuccino di quella sorte, con un certo sospiro,
Man I'm the macho like Randy -King Lear alzando le sue finestre, e le diede un'occhiata in
The choppa go Oscar for Grammy Where are the thief? carrozza. Si vendano a metter nelle mani di chi era
B**** n**** pull up ya panty Thou shalt never have the captains at the letter
Hope you killas understand me To the Moor and thing we have not the better shall be sure as stato a sedere sur una strada così fatta con le
Hey Panda, Panda Panda, worth if he be anger— braccia in
Panda, Panda, Panda, Panda -Regan
I got broads in Atlanta I pray you, have a countend more than think to do a proclaim’d
Twistin' dope, lean, and the Fanta there of my heart, Hot
Credit cards and the scammers The words save, honest, thief, master, traitor, and deceive seem to
Hittin' off licks in the bando fit the context. Notice also that the dialogue sprouting from the
start text of the license agreement interestingly involves mainly
minor, less tragic characters from the plays.
• https://opendatascience.com/how-to-use-deep-learning-to-write-shakespeare/
• https://customerthink.com/ai-generated-rap-songs/
Questions?
The KNIME® trademark and logo and OPEN FOR INNOVATION® trademark are used by KNIME AG under license from KNIME GmbH,
and are registered in the United States. KNIME® is also registered in Germany.
The KNIME® trademark and logo and OPEN FOR INNOVATION® trademark are used by
KNIME AG under license from KNIME GmbH, and are registered in the United States.
KNIME® is also registered in Germany.
A C
output spaces, or both.
• In this use case the input space, New
3x64x64, remains the same, but
the output space changes from
1000 image categories to 3
cancer types.
CANCER CELLS IM A G E N E T
• Input size
– VGG16: 3x64x64 image
– Us: 1388x1040x3 image
• Image Values
Create Patches Metanode
– VGG16: Normalized 0-1
– Cancer Cells: 0-256
• Pre-Processing
– Multiple patches per
image
– Normalize (per image) Image processing nodes part of KNIME Image Processing Extension:
https://kni.me/e/Uq6QE1IQIqG4q_mp
– Re-arrange dimensions
Questions?
The KNIME® trademark and logo and OPEN FOR INNOVATION® trademark are used by
KNIME AG under license from KNIME GmbH, and are registered in the United States.
KNIME® is also registered in Germany.