This document discusses TensorFlow and provides information about:
1. Major TensorFlow releases from 2016-2018 and new features introduced each year like TensorFlow Serving, Keras API, TensorFlow Lite, etc.
2. Common TensorFlow operations that have changed names or behaviors between TensorFlow 1.x and 2.x like tf.variable, tf.global_variables_initializer, and Session.run.
3. How to distribute training across multiple GPUs and CPUs using strategies like MirroredStrategy in TensorFlow 2.x.
7. โข l io โฆ a ~ nt
โข 1 ()
S m s fโฆ dX e h
S c
โข C ()+ ()/
S io PMC rd yk
โข 5 K L ()-
S 7 M K K S T bwp u bwp
S NJJ KM L
รผ C NFM L K3F (). 7 8 M ()/ 18 5 ()0
โข M
S F 1C D K 26,4
8. โข h S~g vk m e uny tb
โข .GG D ld a T U ( ) (o N
โข x
O 5MI GF 5/ DAC FG
รผ t 0 V P jis F IA AF AF U
O v
รผ 1AFJL
รผ /,/ .5 5 D tc 2, .5 A A tc
9. โข ) (/i ยญ h
0 D MM TS S DF 4FD ) (,
0 ( D T CUT S
0 . PULL F UFSTS
0 ) G KS f () ยญ
รผ 2 TST BP l v ! (,
0 F S 6L cq 7 T8UC
โข ~
3 MPLFTF M EFL P T T P H
4 ST CUTFE T B H
3 7 C LF SUPP T
โข F S 6L >F H
l s d
โข A 1 D MP LF (
l y x ~ b
โข F BS 1 >UPP T ( )
a repw 1 F BS
โข 5BHF 5XFDUT (
TF BDT F M EF
nu ep k TI
nr g
โข F S 6L 4BTB (
m u lth o b
10. 2016
2017
โค TensorFlow Serving
โค Keras API
โค Eager Execution
โค TensorFlow Lite
โค XLA
โค OpenCL w/ OpenCompute
โค Distributed TensorFlow
โค Multi GPU support
โค Mobile TensorFlow
โค TensorFlow Datasets
โค SKLearn (contrib)
โค TensorFlow Slim
โค SyntaxNet
โค DRAGNN
โค TFLearn (contrib)
โค TensorFlow TimeSeries
2018
โค TensorFlow Hub
โค Swift for TensorFlow
โค TensorFlow Models
โค ROCm TensorFlow (Test)
โค TensorRT integration
11. โข 3
L IA GE EG
รผ ) G IAED
รผ -3 GI AD A
L D 3
โข -3
L ) 1 A A โ 11
L D) ) โ EC I 33 โ
C PU Oe
โข 3 I G ? D
L dS X c ) .
L -EE? MV
โข ? 3
L NM a! TR b(
12. โข + +
: + +)
: A P
(+
โข a (
: CA C U
a NP b
: aI NPb
c
: D G
13. โข I K1G P 0 EH K (
R t l[ EH K s fo T a V r Tix .74
โข I K1G P 9 K EID c w
โข I K1G P K .74 ) (
โข I K1G P / / / 9 (
โข I K1G P D K AN E I ( S ( , ) vj u
โข I K1G P F ( , )
โข 9PE G IDN D K I K1G P , ( , S ( US nv
โข I K1G P 3N US b
โข I K8
R 4/4. 27 mg e ]
28. โข T
n w o n
A
โข
w T e D I
u FD b
โข
โข s s A
r ยญ b
โข b
1 51 8 0/ 0 5 2 9 iP A l
d
t b
29. ( 1 ) 2
โข 2 3 e
A ยญ
A r I o P y e / 8 / E F lG
โข 038 r w
A r ha u
โข
A 7/ u r s
A n g ,/1 t
A
โข
A / 8 N U
A mI
A a
A / 8 Tยท
30. ) ( ) 2
โข o
o
โข h E G a
@defun A o
รผ : @py_func o d
FunctionDefA p g
FunctionDef e
โข o c
31. ( ) 23
โข , A 0 9 7 87 h p d s G
E c Pr
E 7 87 h ia Ty b a h
E
รผ n F w gr
รผ n 27 / C p . 87 h p u l
โข 1 A9 p 67 8 Pr
E 1 A9 e o 27 / C e
E , 7 A : A: o 27 / Cp u
E A 77 t
33. โข n o A
a o A hr โ ho
โข a
tf.io tf.nn tf.math
t m ,(
โข r
), G :p : o
dim โ axis, keep_prob โ rate
34. 2
โข Keras ( https://keras.io )
High-level API โ
โDeep learning accessible to everyoneโ
โข
2017 2
TensorFlow 1.2 contributor
TensorFlow 1.4
โข
โSimplified workflow for TensorFlow users, more powerful features to Keras usersโ
Keras (keras. tf.keras.)
TensorFlow Keras
tf.keras.
โข !
36. ( ) / 2 : 2
โข
tf.global_variables_initializer() tf.get_global_step()
V R
โข ) (, R
tf.assign(x,100) โ x.assign(100)
โข
K R
37. ( ) 1 2
โข Session.run() e
: DF o Ghu o
: t a dP A s e r p y c
โข
: T ) r o n ,
: , r P wl (
# TensorFlow 1.X
outputs = session.run(f(placeholder), feed_dict={placeholder: input})
# TensorFlow 2.0
outputs = f(input)
38. ) (
โข
print โ tf.print
assert โ tf.Assert
for/while โ tf.while_loop (break and continue are supported)
if โ tf.cond
for _ in dataset โ dataset.reduce
39. ( ) 1 2
โข + A A 1A A
F e + A A 2 DT bo
lM rRc g n
F tf.distribute
โข Ua
F g -
F g -
F P
โข 1A A d S
F . 1A A
รผ )
รผ rR
F 2 1A A (
โข i b G m A A
F A C ) 0 1A A (
รผ P d . 1A A
F A 1 C 1A A (
43. . . 2
โข tf.contrib S i a
:F a
รผ R tf.contrib.slim
a
L Ti
โข R
tf.contrib.slim
tf.contrib.tflearn
tf.contrib.tensorrt e
44. ) 1 ( 2
โข 5: 0 . 5// 5: 0 . /GDD CL /G FC CGFI C N
P d V P d 2 9 Rwn~ c
P .DD A DD
P 81 ~ 5// ( ( U
รผ tf.contrib.nccl
รผ d V sr wn~ V g
P 8 FIG 1DG ( - 8 9 b Xv 2 9
โข 5: 0 . 8 FIG 78
P a ~ c
รผ tf.contrib.tensorrt
P 8 FIG 1DG y~ l ~ o (
P 5: 0 . :GD tยญ wn 8 FIG /G i h e m
รผ : R 7 I5 ) T u
P 8 FIG 1DG (- GF C wn G 8 FIG 1DG w
45. ( ) 2
โข 2 0.0 5 A 5 rv
oS c g et T
รผ tf.contrib.tensorrt
5 A/ bg rv ) g o F
2 0.0 C7 na 5 A A V iM c d
รผ I 2 C( l ) N
โข 5 A/ b 2 0.0 5 A 5
9 CA 8a 9 A R M 5 A/ a s
7D 1 w o
5 A/ AD w o
46. ) ( 23
โข /81 0 m
U NDL0 Xa Vg
U 3 - . m 3HIH M OHP DF
U 06D DL+ 06D / M HC N m 0 e s
รผ TDL 2 A0
รผ DML + 0MOD h w PRD r
U 0 m ()-Y ) n
รผ NDL0 ( Xa
รผ z m DLPMOE MR OMC ) )
U 3 ), Xa l rf m
โข DLPMO3 MR
U 9HFG c
U iy LHFG t o jp
48. 2 1
โข 0 .
). (2 i F
d !
). (2 . 1. f
รผ F ea_ F
T X g T X f
tf_upgrade_v2 --infile tf_example-v1.py --outfile tf_example-v2.py
'tensorflow/tools/compatibility/testdata/test_file_v1_12.py' Line 65
--------------------------------------------------------------------------------
Added keyword 'input' to reordered function 'tf.argmax'
Renamed keyword argument from 'dimension' to 'axis'
Old: tf.argmax([[1, 3, 2]], dimension=0))
~~~~~~~~~~
New: tf.argmax(input=[[1, 3, 2]], axis=0))
50. โข 29 + 29121
b P a
+ 2 ? 9 9 3 8
dT im f S F
โข 29 + , 0 0
a
p x S
โข 29 29
f S h
S n dT e n
ยญ
โข , 9 โ 3
E
y
ts 9v
l
รผ 9 d f a 3 +v
w r o
รผ 3 g 29 + r o