Try setting your model to evalaution mode with my.eval()
before writing it to tensorboard.
This reduces the randomness in your model for each pass. As the add_graph
method calls the graph several times for tracing, it errors when differences happend due to the random nature of the model.