error with d2l.HyperParameters

i get this error in Object-Oriented Design for Implementation part code, i run it on colab anyone knows how to fix it?

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-14-65a84a568aad> in <module>
      1 # Call the fully implemented HyperParameters class saved in d2l
----> 2 class B(d2l.HyperParameters):
      3     def __init__(self, a, b, c):
      4         self.save_hyperparameters(ignore=['c'])
      5         print('self.a =', self.a, 'self.b =', self.b)

AttributeError: module 'd2l.torch' has no attribute 'HyperParameters'
1 Like

I have the same problem.

I have the same problen, no chance in playing the code

pip install d2l==1.0.0b0

I solve it,plz uninstall d2l then install d2l in this version,they just did not update the library

Using Colab, I get this error message:
AttributeError: module ‘d2l’ has no attribute ‘HyperParameters’
even after installing the 1.0.0b0 version.

Any resolution on this issue?

AttributeError Traceback (most recent call last)
in <cell line: 2>()
1 # Call the fully implemented HyperParameters class saved in d2l
----> 2 class B(d2l.HyperParameters):
3 def init(self, a, b, c):
4 self.save_hyperparameters(ignore=[‘c’])
5 print(‘self.a =’, self.a, ‘self.b =’, self.b)

AttributeError: module ‘d2l.torch’ has no attribute ‘HyperParameters’

Same issue - pip install --upgrade d2l==1.0.0a0 worked for me.