I don’t know how tf.flags are used, but assuming these values are used as arguments you could use plain Python variables:
batch_size = 32
data = torch.randn(batch_size)

or in case it’s used to parse arguments you could use argparse.