Two-dimensional (2D) discrete dislocation plasticity simulations are carried out to investigate the Bauschinger effect (BE) in freestanding thin films. The BE in plastic flow of polycrystalline materials is generally understood to be caused by inhomogeneous deformation during loading, leading to residual stress upon unloading. This inhomogeneity can be caused by dislocation pile-ups, variations in texture, grain orientations, and grain size. To study the BE, columnar-grained films as well as films with multiple grains across the thickness are considered. The film is modeled in a 2D framework by a unit cell consisting of an array of grains with different orientation. In order to capture the interaction among grains, we motivate and explore the use of an affine deformation assumption on the grain level to mimic the three-dimensional geometry in this framework. It is shown that the dispersion of grain size in a film together with the size-dependence of yield strength leads to significant BEs in bare films. Quantitative comparison of simulations with experimental data is provided.