[Python] What is the difference between parameters and children?

Discussão em 'Python' iniciado por Stack, Janeiro 31, 2025.

  1. Stack

    Stack Membro Participativo

    It looks like parameters and children show the same info, so what is the difference between them?

    import torch

    print('torch.__version__', torch.__version__)

    m = torch.load('imagenet_resnet18.pth')

    print(m.parameters)
    print(m.children)

    Continue reading...

Compartilhe esta Página