發表文章

目前顯示的是 12月 7, 2018的文章

HMCS Saint John (K456)

圖片
HMCS Saint John History Canada Name: Saint John Namesake: Saint John, New Brunswick Operator: Royal Canadian Navy Ordered: October 1941 Builder: Canadian Vickers Ltd. Montreal, Quebec Laid down: 28 May 1943 Launched: 25 August 1943 Commissioned: 13 December 1943 Decommissioned: 27 November 1945 Identification: pennant number: K 456 Honours and awards: Atlantic 1944, English Channel 1944, Normandy 1944, North Sea 1945 [1] Fate: sold, scrapped 1947 General characteristics Class and type: River-class frigate Displacement: 1,445 long tons (1,468 t; 1,618 short tons) 2,110 long tons (2,140 t; 2,360 short tons) (deep load) Length: 283 ft (86.26 m) p/p 301.25 ft (91.82 m)o/a Beam: 36.5 ft (11.13 m) Draught: 9 ft (2.74 m); 13 ft (3.96 m) (deep load) Propulsion: 2 x Admiralty 3-drum boilers, 2 shafts, reciprocating vertical triple expansion, 5,500 ihp (4,100 kW) Speed: 20

Is an eager-graph compatible same code solution possible?

圖片
up vote 3 down vote favorite I am trying to write code that is eager and graph compatible. However, there is very little information online for how to do this, being a literal footnote on TensorFlow's website. Furthermore, what they have wrote is confusing, saying: The same code written for eager execution will also build a graph during graph execution. Do this by simply running the same code in a new Python session where eager execution is not enabled. This implies that a same code solution is possible, where the only change required is the addition or removal of tf.enable_eager_execution() . Currently I use tf.keras to define my model and tf.data for my input pipeline. However, many eager operations don't work in graph, with the opposite also being true. For example, I keep track of my number of epochs using