如果是在jupyter notebook里运行,检查一下内核选对没,我之前就是没有选内核(内核在上面工具栏kernel里最下面有个change kernel 里面是你的所有环境)
主要是学习率的问题,我bs调成2048也能收敛
ValueError Traceback (most recent call last)
Cell In[2], line 4
2 from torch import nn
3 from torch.nn import functional as F
----> 4 from d2l import torch as d2l
7 class Residual(nn.Module): #@save
8 def init(self, input_channels, num_channels,
9 use_1x1conv=False, strides=1):
File ~\anaconda3\envs\d2l\lib\site-packages\d2l\torch.py:32
30 import zipfile
31 from collections import defaultdict
—> 32 import pandas as pd
33 import requests
34 from IPython import display
File ~\anaconda3\envs\d2l\lib\site-packages\pandas_init_.py:29
22 from pandas.compat.numpy import (
23 np_version_under1p17 as _np_version_under1p17,
24 np_version_under1p18 as _np_version_under1p18,
25 is_numpy_dev as _is_numpy_dev,
26 )
28 try:
—> 29 from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib
30 except ImportError as e: # pragma: no cover
31 # hack but overkill to use re
32 module = str(e).replace("cannot import name ", “”)
File ~\anaconda3\envs\d2l\lib\site-packages\pandas_libs_init_.py:13
1 all = [
2 “NaT”,
3 “NaTType”,
(…)
9 “Interval”,
10 ]
—> 13 from pandas._libs.interval import Interval
14 from pandas._libs.tslibs import (
15 NaT,
16 NaTType,
(…)
21 iNaT,
22 )
File pandas_libs\interval.pyx:1, in init pandas._libs.interval()
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
请问为什么下载完cuda之后就开始报错了?
