Closed MrDavidYu closed 6 years ago
Hi, I took a quick look and saw your place holder is a flattened image and with a batch of size one, defined as:
x = tf.placeholder(tf.float32, [1, 84843], name='InputData')
Note that x (placeholder) is the input of the train_network function. while your batch_imges that you feed into the sess.run seems to depend on batch_size and have a tensor shape (B, W, H, C). Fix this and I think you will be fine. If I am right, a fast fix is:
x = tf.placeholder(tf.float32, [None, 84, 84, 3], name='InputData')
check if it solves the problem.
@arashsaber Perfect, I was able to solve the issue per your suggestion. Although I still received an out of memory warning every epoch, but this went away when I rescaled the input image to 28*28. Thanks.
I'm trying to extend the code to train on colored images of size 84x84. But I am getting the following error during training:
Initially I thought the issue was with my CPU not being compatible or my machine had to little memory, so I tried to train on a K80 GPU but got the same error. Now I am thinking I made an error in memory allocation but I can't pin point the issue. Here is my code:
Any ideas on what might have caused this issue? Thanks!