Traceback (most recent call last):


 "/Users/taw/PycharmProjects/stractTest/tensorTest4.py", line 46, in <module>

writer = tf.train.SummaryWriter("/Users/taw/logs", sess.graph)


 "/Users/taw/anaconda/lib/python2.7/site-packages/tensorflow/python/training/summary_io.py", line 82, in __init__

self.add_graph(graph_def)


 "/Users/taw/anaconda/lib/python2.7/site-packages/tensorflow/python/training/summary_io.py", line 128, in add_graph

event = event_pb2.Event(wall_time=time.time(), graph_def=graph_def)


 "/Users/taw/anaconda/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 519, in init

_ReraiseTypeErrorWithFieldName(message_descriptor.name, field_name)


 "/Users/taw/anaconda/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 450, in _ReraiseTypeErrorWithFieldName

six.reraise(type(exc), exc, sys.exc_info()[2])


 "/Users/taw/anaconda/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 517, in init

copy.MergeFrom(new_val)


 "/Users/taw/anaconda/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 1208, in MergeFrom

"expected %s got %s." % (cls.__name__, type(msg).__name__))
TypeError: Parameter to MergeFrom() must be instance of same class: expected GraphDef got Graph. for field Event.graph_def
Traceback (most recent call last):


 "/usr/lib/python3.5/http/client.py", line 908, in send

self.sock.sendall(data)


 "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 292, in sendall

sent = self._send_until_done(data[total_sent:total_sent + SSL_WRITE_BLOCKSIZE])


 "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 281, in _send_until_done

return self.connection.send(data)


 "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1253, in send

raise TypeError("data must be a memoryview, buffer or byte string")
TypeError: data must be a memoryview, buffer or byte string
