Changing these lines of code might remove the copy_ ops and you could try it by locally creating this model with the changes.
However, just out of interest, why would you like to remove these operations from the graph?