Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.57 KB | None | 0 0
  1. weights = {
  2. 'wConv1': tf.Variable(tf.random_normal([5, 5, 1, 3],0,0.25), name='wC1'),
  3. 'wConv2': tf.Variable(tf.random_normal([5, 5, 3, 32],0,0.25), name='wC2'),
  4. 'wConv3': tf.Variable(tf.random_normal([5, 5, 32, 64],0,0.25), name='wC3'),
  5. 'wConv4': tf.Variable(tf.random_normal([5, 5, 64, 128],0,0.25), name='wC4'),
  6. 'wConv5': tf.Variable(tf.random_normal([5, 5, 128, 64],0,0.25), name='wC5'),
  7. 'wConv6': tf.Variable(tf.random_normal([5, 5, 64, 32],0,0.25), name='wC6'),
  8. 'wConv7': tf.Variable(tf.random_normal([5, 5, 32, 16],0,0.25), name='wC7'),
  9. 'wOUT' : tf.Variable(tf.random_normal([5, 5, 16, 1],0,0.25), name='wCOUT')
  10. }
  11.  
  12. biases = {
  13. 'bConv1': tf.Variable(tf.random_normal([3]), name='bC1'),
  14. 'bConv2': tf.Variable(tf.random_normal([32]), name='bC2'),
  15. 'bConv3': tf.Variable(tf.random_normal([64]), name='bC3'),
  16. 'bConv4': tf.Variable(tf.random_normal([128]), name='bC4'),
  17. 'bConv5': tf.Variable(tf.random_normal([64]), name='bC5'),
  18. 'bConv6': tf.Variable(tf.random_normal([32]), name='bC6'),
  19. 'bConv7': tf.Variable(tf.random_normal([16]), name='bC7'),
  20. 'bOUT': tf.Variable(tf.random_normal([1]), name='bCOUT')
  21. }
  22.  
  23. saver = tf.train.Saver({"weights": weights, "biases": biases})
  24. save_path = saver.save(sess, "./output/trained.ckpt")
  25.  
  26. with sess.as_default():
  27. saver = tf.train.import_meta_graph('output.ckpt.meta')
  28. saver.restore(sess,tf.train.latest_checkpoint('./'))
  29. a= tf.all_variables()
  30. sess.run(tf.global_variables_initializer())
  31. b=sess.run(pred,feed_dict={x: input[:,:,:,30,:]})
  32.  
  33. <tf.Variable 'wC1:0' shape=(5, 5, 1, 3) dtype=float32_ref>,
  34. <tf.Variable 'wC2:0' shape=(5, 5, 3, 32) dtype=float32_ref>,
  35. <tf.Variable 'wC3:0' shape=(5, 5, 32, 64) dtype=float32_ref>,
  36. <tf.Variable 'wC4:0' shape=(5, 5, 64, 128) dtype=float32_ref>,
  37. <tf.Variable 'wC5:0' shape=(5, 5, 128, 64) dtype=float32_ref>,
  38. <tf.Variable 'wC6:0' shape=(5, 5, 64, 32) dtype=float32_ref>,
  39. <tf.Variable 'wC7:0' shape=(5, 5, 32, 16) dtype=float32_ref>,
  40. <tf.Variable 'wCOUT:0' shape=(5, 5, 16, 1) dtype=float32_ref>,
  41. <tf.Variable 'bC1:0' shape=(3,) dtype=float32_ref>,
  42. <tf.Variable 'bC2:0' shape=(32,) dtype=float32_ref>,
  43. <tf.Variable 'bC3:0' shape=(64,) dtype=float32_ref>,
  44. <tf.Variable 'bC4:0' shape=(128,) dtype=float32_ref>,
  45. <tf.Variable 'bC5:0' shape=(64,) dtype=float32_ref>,
  46. <tf.Variable 'bC6:0' shape=(32,) dtype=float32_ref>,
  47. <tf.Variable 'bC7:0' shape=(16,) dtype=float32_ref>,
  48. <tf.Variable 'bCOUT:0' shape=(1,) dtype=float32_ref>,
  49. <tf.Variable 'beta1_power:0' shape=() dtype=float32_ref>,
  50. <tf.Variable 'beta2_power:0' shape=() dtype=float32_ref>,
  51. <tf.Variable 'wC1/Adam:0' shape=(5, 5, 1, 3) dtype=float32_ref>,
  52. <tf.Variable 'wC1/Adam_1:0' shape=(5, 5, 1, 3) dtype=float32_ref>,
  53. <tf.Variable 'wC2/Adam:0' shape=(5, 5, 3, 32) dtype=float32_ref>,
  54. <tf.Variable 'wC2/Adam_1:0' shape=(5, 5, 3, 32) dtype=float32_ref>,
  55. <tf.Variable 'wC3/Adam:0' shape=(5, 5, 32, 64) dtype=float32_ref>,
  56. <tf.Variable 'wC3/Adam_1:0' shape=(5, 5, 32, 64) dtype=float32_ref>,
  57. <tf.Variable 'wC4/Adam:0' shape=(5, 5, 64, 128) dtype=float32_ref>,
  58. <tf.Variable 'wC4/Adam_1:0' shape=(5, 5, 64, 128) dtype=float32_ref>,
  59. <tf.Variable 'wC5/Adam:0' shape=(5, 5, 128, 64) dtype=float32_ref>,
  60. <tf.Variable 'wC5/Adam_1:0' shape=(5, 5, 128, 64) dtype=float32_ref>,
  61. <tf.Variable 'wC6/Adam:0' shape=(5, 5, 64, 32) dtype=float32_ref>,
  62. <tf.Variable 'wC6/Adam_1:0' shape=(5, 5, 64, 32) dtype=float32_ref>,
  63. <tf.Variable 'wC7/Adam:0' shape=(5, 5, 32, 16) dtype=float32_ref>,
  64. <tf.Variable 'wC7/Adam_1:0' shape=(5, 5, 32, 16) dtype=float32_ref>,
  65. <tf.Variable 'wCOUT/Adam:0' shape=(5, 5, 16, 1) dtype=float32_ref>,
  66. <tf.Variable 'wCOUT/Adam_1:0' shape=(5, 5, 16, 1) dtype=float32_ref>,
  67. <tf.Variable 'bC1/Adam:0' shape=(3,) dtype=float32_ref>,
  68. <tf.Variable 'bC1/Adam_1:0' shape=(3,) dtype=float32_ref>,
  69. <tf.Variable 'bC2/Adam:0' shape=(32,) dtype=float32_ref>,
  70. <tf.Variable 'bC2/Adam_1:0' shape=(32,) dtype=float32_ref>,
  71. <tf.Variable 'bC3/Adam:0' shape=(64,) dtype=float32_ref>,
  72. <tf.Variable 'bC3/Adam_1:0' shape=(64,) dtype=float32_ref>,
  73. <tf.Variable 'bC4/Adam:0' shape=(128,) dtype=float32_ref>,
  74. <tf.Variable 'bC4/Adam_1:0' shape=(128,) dtype=float32_ref>,
  75. <tf.Variable 'bC5/Adam:0' shape=(64,) dtype=float32_ref>,
  76. <tf.Variable 'bC5/Adam_1:0' shape=(64,) dtype=float32_ref>,
  77. <tf.Variable 'bC6/Adam:0' shape=(32,) dtype=float32_ref>,
  78. <tf.Variable 'bC6/Adam_1:0' shape=(32,) dtype=float32_ref>,
  79. <tf.Variable 'bC7/Adam:0' shape=(16,) dtype=float32_ref>,
  80. <tf.Variable 'bC7/Adam_1:0' shape=(16,) dtype=float32_ref>,
  81. <tf.Variable 'bCOUT/Adam:0' shape=(1,) dtype=float32_ref>,
  82. <tf.Variable 'bCOUT/Adam_1:0' shape=(1,) dtype=float32_ref>,
  83. <tf.Variable 'wC1:0' shape=(5, 5, 1, 3) dtype=float32_ref>,
  84. <tf.Variable 'wC2:0' shape=(5, 5, 3, 32) dtype=float32_ref>,
  85. <tf.Variable 'wC3:0' shape=(5, 5, 32, 64) dtype=float32_ref>,
  86. <tf.Variable 'wC4:0' shape=(5, 5, 64, 128) dtype=float32_ref>,
  87. <tf.Variable 'wC5:0' shape=(5, 5, 128, 64) dtype=float32_ref>,
  88. <tf.Variable 'wC6:0' shape=(5, 5, 64, 32) dtype=float32_ref>,
  89. <tf.Variable 'wC7:0' shape=(5, 5, 32, 16) dtype=float32_ref>,
  90. <tf.Variable 'wCOUT:0' shape=(5, 5, 16, 1) dtype=float32_ref>,
  91. <tf.Variable 'bC1:0' shape=(3,) dtype=float32_ref>,
  92. <tf.Variable 'bC2:0' shape=(32,) dtype=float32_ref>,
  93. <tf.Variable 'bC3:0' shape=(64,) dtype=float32_ref>,
  94. <tf.Variable 'bC4:0' shape=(128,) dtype=float32_ref>,
  95. <tf.Variable 'bC5:0' shape=(64,) dtype=float32_ref>,
  96. <tf.Variable 'bC6:0' shape=(32,) dtype=float32_ref>,
  97. <tf.Variable 'bC7:0' shape=(16,) dtype=float32_ref>,
  98. <tf.Variable 'bCOUT:0' shape=(1,) dtype=float32_ref>,
  99. <tf.Variable 'beta1_power:0' shape=() dtype=float32_ref>,
  100. <tf.Variable 'beta2_power:0' shape=() dtype=float32_ref>,
  101. <tf.Variable 'wC1/Adam:0' shape=(5, 5, 1, 3) dtype=float32_ref>,
  102. <tf.Variable 'wC1/Adam_1:0' shape=(5, 5, 1, 3) dtype=float32_ref>,
  103. <tf.Variable 'wC2/Adam:0' shape=(5, 5, 3, 32) dtype=float32_ref>,
  104. <tf.Variable 'wC2/Adam_1:0' shape=(5, 5, 3, 32) dtype=float32_ref>,
  105. <tf.Variable 'wC3/Adam:0' shape=(5, 5, 32, 64) dtype=float32_ref>,
  106. <tf.Variable 'wC3/Adam_1:0' shape=(5, 5, 32, 64) dtype=float32_ref>,
  107. <tf.Variable 'wC4/Adam:0' shape=(5, 5, 64, 128) dtype=float32_ref>,
  108. <tf.Variable 'wC4/Adam_1:0' shape=(5, 5, 64, 128) dtype=float32_ref>,
  109. <tf.Variable 'wC5/Adam:0' shape=(5, 5, 128, 64) dtype=float32_ref>,
  110. <tf.Variable 'wC5/Adam_1:0' shape=(5, 5, 128, 64) dtype=float32_ref>,
  111. <tf.Variable 'wC6/Adam:0' shape=(5, 5, 64, 32) dtype=float32_ref>,
  112. <tf.Variable 'wC6/Adam_1:0' shape=(5, 5, 64, 32) dtype=float32_ref>,
  113. <tf.Variable 'wC7/Adam:0' shape=(5, 5, 32, 16) dtype=float32_ref>,
  114. <tf.Variable 'wC7/Adam_1:0' shape=(5, 5, 32, 16) dtype=float32_ref>,
  115. <tf.Variable 'wCOUT/Adam:0' shape=(5, 5, 16, 1) dtype=float32_ref>,
  116. <tf.Variable 'wCOUT/Adam_1:0' shape=(5, 5, 16, 1) dtype=float32_ref>,
  117. <tf.Variable 'bC1/Adam:0' shape=(3,) dtype=float32_ref>,
  118. <tf.Variable 'bC1/Adam_1:0' shape=(3,) dtype=float32_ref>,
  119. <tf.Variable 'bC2/Adam:0' shape=(32,) dtype=float32_ref>,
  120. <tf.Variable 'bC2/Adam_1:0' shape=(32,) dtype=float32_ref>,
  121. <tf.Variable 'bC3/Adam:0' shape=(64,) dtype=float32_ref>,
  122. <tf.Variable 'bC3/Adam_1:0' shape=(64,) dtype=float32_ref>,
  123. <tf.Variable 'bC4/Adam:0' shape=(128,) dtype=float32_ref>,
  124. <tf.Variable 'bC4/Adam_1:0' shape=(128,) dtype=float32_ref>,
  125. <tf.Variable 'bC5/Adam:0' shape=(64,) dtype=float32_ref>,
  126. <tf.Variable 'bC5/Adam_1:0' shape=(64,) dtype=float32_ref>,
  127. <tf.Variable 'bC6/Adam:0' shape=(32,) dtype=float32_ref>,
  128. <tf.Variable 'bC6/Adam_1:0' shape=(32,) dtype=float32_ref>,
  129. <tf.Variable 'bC7/Adam:0' shape=(16,) dtype=float32_ref>,
  130. <tf.Variable 'bC7/Adam_1:0' shape=(16,) dtype=float32_ref>,
  131. <tf.Variable 'bCOUT/Adam:0' shape=(1,) dtype=float32_ref>,
  132. <tf.Variable 'bCOUT/Adam_1:0' shape=(1,) dtype=float32_ref>,
  133. <tf.Variable 'wC1:0' shape=(5, 5, 1, 3) dtype=float32_ref>,
  134. <tf.Variable 'wC2:0' shape=(5, 5, 3, 32) dtype=float32_ref>,
  135. <tf.Variable 'wC3:0' shape=(5, 5, 32, 64) dtype=float32_ref>,
  136. <tf.Variable 'wC4:0' shape=(5, 5, 64, 128) dtype=float32_ref>,
  137. <tf.Variable 'wC5:0' shape=(5, 5, 128, 64) dtype=float32_ref>,
  138. <tf.Variable 'wC6:0' shape=(5, 5, 64, 32) dtype=float32_ref>,
  139. <tf.Variable 'wC7:0' shape=(5, 5, 32, 16) dtype=float32_ref>,
  140. <tf.Variable 'wCOUT:0' shape=(5, 5, 16, 1) dtype=float32_ref>,
  141. <tf.Variable 'bC1:0' shape=(3,) dtype=float32_ref>,
  142. <tf.Variable 'bC2:0' shape=(32,) dtype=float32_ref>,
  143. <tf.Variable 'bC3:0' shape=(64,) dtype=float32_ref>,
  144. <tf.Variable 'bC4:0' shape=(128,) dtype=float32_ref>,
  145. <tf.Variable 'bC5:0' shape=(64,) dtype=float32_ref>,
  146. <tf.Variable 'bC6:0' shape=(32,) dtype=float32_ref>,
  147.  
  148.  
  149. <tf.Variable 'bC7:0' shape=(16,) dtype=float32_ref>,
  150. <tf.Variable 'bCOUT:0' shape=(1,) dtype=float32_ref>,
  151. <tf.Variable 'beta1_power:0' shape=() dtype=float32_ref>,
  152. <tf.Variable 'beta2_power:0' shape=() dtype=float32_ref>,
  153. <tf.Variable 'wC1/Adam:0' shape=(5, 5, 1, 3) dtype=float32_ref>,
  154. <tf.Variable 'wC1/Adam_1:0' shape=(5, 5, 1, 3) dtype=float32_ref>,
  155. <tf.Variable 'wC2/Adam:0' shape=(5, 5, 3, 32) dtype=float32_ref>,
  156. <tf.Variable 'wC2/Adam_1:0' shape=(5, 5, 3, 32) dtype=float32_ref>,
  157. <tf.Variable 'wC3/Adam:0' shape=(5, 5, 32, 64) dtype=float32_ref>,
  158. <tf.Variable 'wC3/Adam_1:0' shape=(5, 5, 32, 64) dtype=float32_ref>,
  159. <tf.Variable 'wC4/Adam:0' shape=(5, 5, 64, 128) dtype=float32_ref>,
  160. <tf.Variable 'wC4/Adam_1:0' shape=(5, 5, 64, 128) dtype=float32_ref>,
  161. <tf.Variable 'wC5/Adam:0' shape=(5, 5, 128, 64) dtype=float32_ref>,
  162. <tf.Variable 'wC5/Adam_1:0' shape=(5, 5, 128, 64) dtype=float32_ref>,
  163. <tf.Variable 'wC6/Adam:0' shape=(5, 5, 64, 32) dtype=float32_ref>,
  164. <tf.Variable 'wC6/Adam_1:0' shape=(5, 5, 64, 32) dtype=float32_ref>,
  165. <tf.Variable 'wC7/Adam:0' shape=(5, 5, 32, 16) dtype=float32_ref>,
  166. <tf.Variable 'wC7/Adam_1:0' shape=(5, 5, 32, 16) dtype=float32_ref>,
  167. <tf.Variable 'wCOUT/Adam:0' shape=(5, 5, 16, 1) dtype=float32_ref>,
  168. <tf.Variable 'wCOUT/Adam_1:0' shape=(5, 5, 16, 1) dtype=float32_ref>,
  169. <tf.Variable 'bC1/Adam:0' shape=(3,) dtype=float32_ref>,
  170. <tf.Variable 'bC1/Adam_1:0' shape=(3,) dtype=float32_ref>,
  171. <tf.Variable 'bC2/Adam:0' shape=(32,) dtype=float32_ref>,
  172. <tf.Variable 'bC2/Adam_1:0' shape=(32,) dtype=float32_ref>,
  173. <tf.Variable 'bC3/Adam:0' shape=(64,) dtype=float32_ref>,
  174. <tf.Variable 'bC3/Adam_1:0' shape=(64,) dtype=float32_ref>,
  175. <tf.Variable 'bC4/Adam:0' shape=(128,) dtype=float32_ref>,
  176. <tf.Variable 'bC4/Adam_1:0' shape=(128,) dtype=float32_ref>,
  177. <tf.Variable 'bC5/Adam:0' shape=(64,) dtype=float32_ref>,
  178. <tf.Variable 'bC5/Adam_1:0' shape=(64,) dtype=float32_ref>,
  179. <tf.Variable 'bC6/Adam:0' shape=(32,) dtype=float32_ref>,
  180. <tf.Variable 'bC6/Adam_1:0' shape=(32,) dtype=float32_ref>,
  181. <tf.Variable 'bC7/Adam:0' shape=(16,) dtype=float32_ref>,
  182. <tf.Variable 'bC7/Adam_1:0' shape=(16,) dtype=float32_ref>,
  183. <tf.Variable 'bCOUT/Adam:0' shape=(1,) dtype=float32_ref>,
  184. <tf.Variable 'bCOUT/Adam_1:0' shape=(1,) dtype=float32_ref>]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement