TensorFlow問題:
1、FLAGS._parse_flags()報錯AttributeError:_parse_flags
解決:
因為TensorFlow的版本問題了,TensorFlow版本升級后,它就無情的拋棄了FLAGS._parse_flags()這種用法,改成了用FLAGS.flag_values_dict()
2、raise ValueError("Shapes %s and %s are incompatible" % (self, other))
ValueError: Shapes (3, ?, 1, 1, 128) and () are incompatible
解決:
concated = tf.concat(1, [indices, sparse_labels])改為:
concated= tf.concat([indices, sparse_labels], 1)
3、WARNING:softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See tf.nn.softmax_cross_entropy_with_logits_v2.
解決:
將tf.nn.softmax_cross_entropy_with_logits改為:
tf.nn.softmax_cross_entropy_with_logits_v2
4.ValueError: Only call `softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
解決:
將cross_entropy2=tf.reduce_sum(tf.nn.softmax_cross_entropy_with_logits_v2(logits, y_))改為:
cross_entropy2=tf.reduce_sum(tf.nn.softmax_cross_entropy_with_logits_v2(labels=logits, logits=y_))
