Hi, how about this?
for epoch in train_process:
       if epoch == 50:
           network_to_freeze.train(False)    
       train all network code(Same code here*)

network_to_freeze would no more be trained after 50 epochs.