  We propose a method to represent the path integral over gauge fields as a
tensor network. We introduce a trial action with variational parameters and
generate gauge field configurations with the weight defined by the trial
action. We construct initial tensors with indices labelling these gauge field
configurations. We perform the tensor renormalization group with the initial
tensors and optimize the variational parameters. As a first step to the TRG
study of non-Abelian gauge theory in more than two dimensions, we apply this
method to three-dimensional pure SU(2) gauge theory. Our result for the free
energy agrees with the analytical results in weak and strong coupling regimes.
