Tensorflow summery merge error : Shape [-1,784] has negative dimensions

前端 未结 3 504
终归单人心
终归单人心 2021-01-12 04:24

I am trying to get summary of a training process of the neural net below.

import tensorflow as tf 
import numpy as n         


        
3条回答
  •  北荒
    北荒 (楼主)
    2021-01-12 05:25

    I was also having this problem. Searching around the basic consensus is to check for problems somewhere else in your code.

    What fixed it for me was I was doing a sess.run(summary_op) without feeding in data for my placeholders.

    Tensorflow seems to be a bit strange with placeholders, often they won't mind you not feeding them if you're trying to evaluate part of the graph that is independent of them. Here though, it did.

提交回复
热议问题