SHARE
TWEET

Untitled

a guest Jun 25th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. hub.Module(tf_hub_path, tags={"gen", "bs8"})
  2.      
  3. hub.Module(tf_hub_path, tags={"disc", "bs8"})
  4.      
  5. ValueError: Tensor discriminator/linear/bias is not found in b'/tf_hub/variables/variables' checkpoint {'generator/fc_noise/kernel': [2, 48], 'generator/fc_noise/bias': [48]}
  6.      
  7. checkpoint_path = tf.train.latest_checkpoint(self.model_dir)
  8. inspect_list = tf.train.list_variables(checkpoint_path)
  9. print(inspect_list)
  10.  
  11. [('disc_step_1/beta1_power', []),
  12. ('disc_step_1/beta2_power', []),
  13. ('discriminator/linear/bias', [1]),
  14. ('discriminator/linear/bias/d_opt', [1]),
  15. ('discriminator/linear/bias/d_opt_1', [1]),
  16. ('discriminator/linear/kernel', [3, 1]),
  17. ('discriminator/linear/kernel/d_opt', [3, 1]),
  18. ('discriminator/linear/kernel/d_opt_1', [3, 1]),
  19. ('gen_step/beta1_power', []),
  20. ('gen_step/beta2_power', []),
  21. ('generator/fc_noise/bias', [48]),
  22. ('generator/fc_noise/bias/g_opt', [48]),
  23. ('generator/fc_noise/bias/g_opt_1', [48]),
  24. ('generator/fc_noise/kernel', [2, 48]),
  25. ('generator/fc_noise/kernel/g_opt', [2, 48]),
  26. ('generator/fc_noise/kernel/g_opt_1', [2, 48]),
  27. ('global_step', []),
  28. ('global_step_disc', [])]
  29.      
  30. module_spec.export(tf_hub_path, checkpoint_path=checkpoint_path)
  31.      
  32. print(module.variable_map)
  33. {'discriminator/linear/bias': <tf.Variable 'module_8/discriminator/linear/bias:0' shape=(1,) dtype=float32>, 'discriminator/linear/kernel': <tf.Variable 'module_8/discriminator/linear/kernel:0' shape=(3, 1) dtype=float32>}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top