{"action":"created","issue":{"url":"https://api.github.com/repos/MSiam/TFSegmentation/issues/44","repository_url":"https://api.github.com/repos/MSiam/TFSegmentation","labels_url":"https://api.github.com/repos/MSiam/TFSegmentation/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/MSiam/TFSegmentation/issues/44/comments","events_url":"https://api.github.com/repos/MSiam/TFSegmentation/issues/44/events","html_url":"https://github.com/MSiam/TFSegmentation/issues/44","id":357919460,"node_id":"MDU6SXNzdWUzNTc5MTk0NjA=","number":44,"title":"ValueError: Cannot feed value of shape (8, 512, 1024, 3) for Tensor 'network/input/Placeholder:0', which has shape '(8, 256, 512, 3)'","user":{"login":"sounansu","id":14190013,"node_id":"MDQ6VXNlcjE0MTkwMDEz","avatar_url":"https://avatars1.githubusercontent.com/u/14190013?v=4","gravatar_id":"","url":"https://api.github.com/users/sounansu","html_url":"https://github.com/sounansu","followers_url":"https://api.github.com/users/sounansu/followers","following_url":"https://api.github.com/users/sounansu/following{/other_user}","gists_url":"https://api.github.com/users/sounansu/gists{/gist_id}","starred_url":"https://api.github.com/users/sounansu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sounansu/subscriptions","organizations_url":"https://api.github.com/users/sounansu/orgs","repos_url":"https://api.github.com/users/sounansu/repos","events_url":"https://api.github.com/users/sounansu/events{/privacy}","received_events_url":"https://api.github.com/users/sounansu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-07T04:55:05Z","updated_at":"2018-09-10T12:50:20Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\n\r\nI tried to train by command run.sh.\r\n($ python3 main.py --load_config=fcn8s_shufflenet_train.yaml train Train FCN8sShuffleNet)\r\nI encount error as below.\r\n\r\n> $ ./run.sh\r\n> /home/sounansu/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\r\n>   from ._conv import register_converters as _register_converters\r\n> \r\n> Parsing Arguments..\r\n> \r\n> Using this arguments check it\r\n> \r\n> batch_size -- 8 --\r\n> batchnorm_enabled -- True --\r\n> bias -- 0.0 --\r\n> config_path -- fcn8s_shufflenet_train.yaml --\r\n> data_dir -- full_cityscapes_res --\r\n> data_mode -- experiment --\r\n> exp_dir -- fcn8s_shufflenet --\r\n> freeze_encoder -- False --\r\n> img_height -- 256 --\r\n> img_width -- 512 --\r\n> learning_decay -- 1e-07 --\r\n> learning_decay_every -- 100 --\r\n> learning_rate -- 0.0001 --\r\n> max_to_keep -- 1 --\r\n> mode -- train --\r\n> model -- FCN8sShuffleNet --\r\n> momentum -- 0.9 --\r\n> num_channels -- 3 --\r\n> num_classes -- 20 --\r\n> num_epochs -- 200 --\r\n> num_groups -- 3 --\r\n> operator -- Train --\r\n> out_dir -- fcn8s_shufflenet --\r\n> pretrained_path -- pretrained_weights/shufflenet_weights.pkl --\r\n> random_cropping -- False --\r\n> save_every -- 10 --\r\n> shuffle -- True --\r\n> test_every -- 10 --\r\n> verbose -- False --\r\n> weight_decay -- 0.0005 --\r\n> weighted_loss -- True --\r\n> \r\n> \r\n> \r\n> Agent is running now...\r\n> \r\n> \r\n> 2018-09-07 12:35:22.150963: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.\r\n> 2018-09-07 12:35:22.150994: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.\r\n> 2018-09-07 12:35:22.355806: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\r\n> 2018-09-07 12:35:22.356259: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 0 with properties:\r\n> name: GeForce GTX 1080 Ti\r\n> major: 6 minor: 1 memoryClockRate (GHz) 1.6705\r\n> pciBusID 0000:03:00.0\r\n> Total memory: 10.91GiB\r\n> Free memory: 10.19GiB\r\n> 2018-09-07 12:35:22.356285: I tensorflow/core/common_runtime/gpu/gpu_device.cc:976] DMA: 0\r\n> 2018-09-07 12:35:22.356295: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 0:   Y\r\n> 2018-09-07 12:35:22.356308: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:03:00.0)\r\n> \r\n> Building the MODEL...\r\n> Building the ShuffleNet..\r\n> Layer_name: network/shufflenet_encoder/conv1/Relu -Output_Shape: [8, 127, 255, 24]\r\n> Layer_name: network/shufflenet_encoder/max_pool -Output_Shape: [8, 63, 127, 24]\r\n> Layer_name: network/shufflenet_encoder/stage2_3/Relu -Output_Shape: [8, 32, 64, 240]\r\n> Layer_name: network/shufflenet_encoder/stage3_7/Relu -Output_Shape: [8, 16, 32, 480]\r\n> Layer_name: network/shufflenet_encoder/stage4_3/Relu -Output_Shape: [8, 8, 16, 960]\r\n> \r\n> Encoder ShuffleNet is built successfully\r\n> \r\n> \r\n> The Model is built successfully\r\n> \r\n>    [-] build_model : 19.11881 sec, which is 0.31865 mins, which is 0.00531 hours\r\n> \r\n> Training is initializing itself\r\n> \r\n> Initializing the variables of the model\r\n> Initialization finished\r\n>    [-] init_model : 3.71544 sec, which is 0.06192 mins, which is 0.00103 hours\r\n> Loading ImageNet pretrained weights...\r\n> ImageNet Pretrained Weights Loaded Initially\r\n> \r\n> \r\n> Pretrained weights of the encoder is loaded\r\n> Searching for a checkpoint\r\n> \r\n> .. No ckpt, SO First time to train :D ..\r\n> \r\n>    [-] load_model : 4.51711 sec, which is 0.07529 mins, which is 0.00125 hours\r\n> Loading Training data..\r\n> Train-shape-x -- (2975, 256, 512, 3) 2975\r\n> Train-shape-y -- (2975, 256, 512)\r\n> Num of iterations on training data in one epoch -- 372\r\n> Training data is loaded\r\n> Loading Validation data..\r\n> Val-shape-x -- (500, 512, 1024, 3) 496\r\n> Val-shape-y -- (500, 512, 1024)\r\n> Num of iterations on validation data in one epoch -- 62\r\n> Validation data is loaded\r\n>    [-] load_train_data : 22.91540 sec, which is 0.38192 mins, which is 0.00637 hours\r\n> Training mode will begin NOW ..\r\n> epoch-0-: 100%|????????????????????????????????????????????????????????????????????????????| 371/372 [01:31<00:00,  4.58it/s]\r\n> epoch-0-loss:14.767903- acc:0.6199\r\n> saving a checkpoint\r\n> Saved a checkpoint\r\n> Validation at step:372 at epoch:1 ..\r\n> Val-epoch-1-:   0%|                                                                                   | 0/62 [00:00<?, ?it/s]Traceback (most recent call last):\r\n>   File \"main.py\", line 19, in <module>\r\n>     main()\r\n>   File \"main.py\", line 15, in main\r\n>     agent.run()\r\n>   File \"/home/sounansu/anaconda3/TFSegmentation/utils/misc.py\", line 18, in timed\r\n>     result = f(*args, **kwargs)\r\n>   File \"/home/sounansu/anaconda3/TFSegmentation/agent.py\", line 96, in run\r\n>     self.train()\r\n>   File \"/home/sounansu/anaconda3/TFSegmentation/agent.py\", line 139, in train\r\n>     self.operator.train()\r\n>   File \"/home/sounansu/anaconda3/TFSegmentation/train/train.py\", line 583, in train\r\n>     epoch=self.model.global_epoch_tensor.eval(self.sess))\r\n>   File \"/home/sounansu/anaconda3/TFSegmentation/train/train.py\", line 636, in test_per_epoch\r\n>     feed_dict=feed_dict)\r\n>   File \"/home/sounansu/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py\", line 895, in run\r\n>     run_metadata_ptr)\r\n>   File \"/home/sounansu/anaconda3/lib/python3.6/site-packages/tensorflow/python/client/session.py\", line 1100, in _run\r\n>     % (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))\r\n> ValueError: Cannot feed value of shape (8, 512, 1024, 3) for Tensor 'network/input/Placeholder:0', which has shape '(8, 256, 512, 3)'\r\n\r\n\r\nWhat happened?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MSiam/TFSegmentation/issues/comments/419900820","html_url":"https://github.com/MSiam/TFSegmentation/issues/44#issuecomment-419900820","issue_url":"https://api.github.com/repos/MSiam/TFSegmentation/issues/44","id":419900820,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTkwMDgyMA==","user":{"login":"moemen95","id":10872652,"node_id":"MDQ6VXNlcjEwODcyNjUy","avatar_url":"https://avatars2.githubusercontent.com/u/10872652?v=4","gravatar_id":"","url":"https://api.github.com/users/moemen95","html_url":"https://github.com/moemen95","followers_url":"https://api.github.com/users/moemen95/followers","following_url":"https://api.github.com/users/moemen95/following{/other_user}","gists_url":"https://api.github.com/users/moemen95/gists{/gist_id}","starred_url":"https://api.github.com/users/moemen95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moemen95/subscriptions","organizations_url":"https://api.github.com/users/moemen95/orgs","repos_url":"https://api.github.com/users/moemen95/repos","events_url":"https://api.github.com/users/moemen95/events{/privacy}","received_events_url":"https://api.github.com/users/moemen95/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T12:50:20Z","updated_at":"2018-09-10T12:50:20Z","author_association":"COLLABORATOR","body":"Train-shape-x -- (2975, 256, 512, 3) 2975\r\nTrain-shape-y -- (2975, 256, 512)\r\nNum of iterations on training data in one epoch -- 372\r\nTraining data is loaded\r\nLoading Validation data..\r\nVal-shape-x -- (500, 512, 1024, 3) 496\r\nVal-shape-y -- (500, 512, 1024)\r\n\r\nYou can see here VALIDATION DATA & TRAINING DATA are not consistent !!!.\r\nPlease check them. "}}
{"actor":{"display_login":"moemen95"}}