Streaming tensors while running?

I am conducting a research regarding a variant of LSTM. I want to analyze the pattern of some softmax gate while running. Is there any way for pytorch to write tensor value to disk per forward pass? Or TensorBoard can do online custom analysis of a tensor?