morning all,
I was looking at a Keras cycleGan and they use the following parameters to deactivate training in the combined model of generator1 -> discriminator 1 -> generator ->2
def define_composite_model(g_model_1, d_model, g_model_2, image_shape):
	# ensure the model we're updating is trainable
	g_model_1.trainable = True
	# mark discriminator as not trainable
	d_model.trainable = False
	# mark other generator model as not trainable
	g_model_2.trainable = False
	# discriminator element

Would the equilant be:

g_model_2=g_model_2.train(mode=false)

where g_model_2 is defined by a class? if so why do i get the error message???

TypeError: train() missing 1 required positional argument: ‘self’

thanks in advance.
Chaslie