- Mastering TensorFlow 1.x
- Armando Fandango
- 165字
- 2021-06-25 22:50:56
Order of execution and lazy loading
The nodes are executed in the order of dependency. If node a depends on node b, then a will be executed before b when the execution of b is requested. A node is not executed unless either the node itself or another node depending on it is not requested for execution. This is also known as lazy loading; namely, the node objects are not created and initialized until they are needed.
Sometimes, you may want to control the order in which the nodes are executed in a graph. This can be achieved with the tf.Graph.control_dependencies() function. For example, if the graph has nodes a, b, c, and d and you want to execute c and d before a and b, then use the following statement:
with graph_variable.control_dependencies([c,d]):
# other statements here
This makes sure that any node in the preceding with block is executed only after nodes c and d have been executed.
- Aftershot Pro:Non-destructive photo editing and management
- Learning SQL Server Reporting Services 2012
- Android NDK Game Development Cookbook
- Applied Unsupervised Learning with R
- 電腦組裝與維修從入門到精通(第2版)
- 3ds Max Speed Modeling for 3D Artists
- Mastering Manga Studio 5
- Rapid BeagleBoard Prototyping with MATLAB and Simulink
- VMware Workstation:No Experience Necessary
- 單片機(jī)技術(shù)及應(yīng)用
- 單片微機(jī)原理及應(yīng)用
- Angular 6 by Example
- Instant Website Touch Integration
- The Applied Artificial Intelligence Workshop
- 零基礎(chǔ)輕松學(xué)修電腦主板