Skip to content

Why can't I run the train_ch3 function even though I installed the d2l package 0.17.6? #2648

@Ooodkkk

Description

@Ooodkkk

import d2l
print(d2l.version)

0.17.6


num_epochs, lr = 10, 0.1
updater = torch.optim.SGD(params, lr=lr)
d2l.train_ch3(net, train_iter, test_iter, loss, num_epochs, updater)

AttributeError Traceback (most recent call last)
Cell In[15], line 3
1 num_epochs, lr = 10, 0.1
2 updater = torch.optim.SGD(params, lr=lr)
----> 3 d2l.train_ch3(net, train_iter, test_iter, loss, num_epochs, updater)

AttributeError: module 'd2l' has no attribute 'train_ch3'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions