It is believed that the recent detection of large tensor perturbations strongly favors the inflation scenario in the early universe and leaves very small room to the alternatives. This common sense depends on the assumption that Einstein's general relativity is valid at the early universe. In this paper we show that nearly scale-invariant primordial tensor perturbations can be generated during a non-inflationary period, such as the contracting phase, before the radiation dominated epoch if the theory of gravity is scalar-tensor at that time. The scale-invariance protect the tensor perturbations from suppressing at large scales and they may have significant amplitudes to fit BICEP2's result. These models are dual to inflation models in the context of general relativity. In terms of the frame or conformal invariant properties of the scalar and tensor perturbations we suggest that only the invariant perturbations are physical. How the background evolves before the radiation time depends on the frames and it is hard to distinguish different pictures by later time cosmological probes.