Will model.eval() sets all the networks in the model to evaluation mode?

If I have

class A(nn.Module)


class B(nn.Module):
    def __init__(self):
        self.a_network = A()

Will B.eval() also set a_network to evaluation mode?


Sets the module in evaluation mode.

I think this function is also effective for sub-modules. In my previous research, there was a similar operation. WHY do you doubt it ?