{"action":"opened","issue":{"url":"https://api.github.com/repos/devsisters/DQN-tensorflow/issues/14","repository_url":"https://api.github.com/repos/devsisters/DQN-tensorflow","labels_url":"https://api.github.com/repos/devsisters/DQN-tensorflow/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/devsisters/DQN-tensorflow/issues/14/comments","events_url":"https://api.github.com/repos/devsisters/DQN-tensorflow/issues/14/events","html_url":"https://github.com/devsisters/DQN-tensorflow/issues/14","id":187919376,"number":14,"title":"[!] Load FAILED error","user":{"login":"unsupervisedER","id":22993707,"avatar_url":"https://avatars.githubusercontent.com/u/22993707?v=3","gravatar_id":"","url":"https://api.github.com/users/unsupervisedER","html_url":"https://github.com/unsupervisedER","followers_url":"https://api.github.com/users/unsupervisedER/followers","following_url":"https://api.github.com/users/unsupervisedER/following{/other_user}","gists_url":"https://api.github.com/users/unsupervisedER/gists{/gist_id}","starred_url":"https://api.github.com/users/unsupervisedER/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unsupervisedER/subscriptions","organizations_url":"https://api.github.com/users/unsupervisedER/orgs","repos_url":"https://api.github.com/users/unsupervisedER/repos","events_url":"https://api.github.com/users/unsupervisedER/events{/privacy}","received_events_url":"https://api.github.com/users/unsupervisedER/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-08T07:20:48Z","updated_at":"2016-11-08T07:20:48Z","closed_at":null,"body":"Hi, I was trying to run the DQN code. when it iterated 50000 steps, an error **[!] Load FAILED** happened. According to the error information. CPU only supports data format \"NHWC\", but the code executed by gpu with data format \"NCHW\". Thus, I want to know how to execute gpu with \"NCHW\" and save or load cpu with \"NHWC\" to avoid this error . THX!!\r\n\r\ncode modified by me following(not work):\r\n\r\n```\r\n  def save_model(self, step=None):\r\n    print(\" [*] Saving checkpoints...\")\r\n    **self.config.cnn_format = \"NHWC\"**\r\n    print(\"******** save begin data_formate %s\", self.config.cnn_format);\r\n    model_name = type(self).__name__\r\n\r\n    if not os.path.exists(self.checkpoint_dir):\r\n      os.makedirs(self.checkpoint_dir)\r\n    self.saver.save(self.sess, self.checkpoint_dir, global_step=step)\r\n    **self.config.cnn_format = \"NCHW\"**\r\n    print(\"******** save end data_formate %s\", self.config.cnn_format);\r\n\r\n\r\n\r\n\r\n  def load_model(self):\r\n    print(\" [*] Loading checkpoints...\")\r\n    **self.config.cnn_format = \"NHWC\"**\r\n    print(\"******** load begin data_formate %s\", self.config.cnn_format);\r\n\r\n    ckpt = tf.train.get_checkpoint_state(self.checkpoint_dir)\r\n    if ckpt and ckpt.model_checkpoint_path:\r\n      ckpt_name = os.path.basename(ckpt.model_checkpoint_path)\r\n      fname = os.path.join(self.checkpoint_dir, ckpt_name)\r\n      self.saver.restore(self.sess, fname)\r\n      print(\" [*] Load SUCCESS: %s\" % fname)\r\n      **self.config.cnn_format = \"NCHW\"**\r\n      print(\"******** load end data_formate %s\", self.config.cnn_format);\r\n      return True\r\n    else:\r\n      print(\" [!] Load FAILED: %s\" % self.checkpoint_dir)\r\n      **self.config.cnn_format = \"NCHW\"**\r\n      print(\"******** load end data_formate %s\", self.config.cnn_format);\r\n      return False\r\n\r\n```"}}
{"actor":{"display_login":"unsupervisedER"}}