最近在學機器學習,但對代碼中的type()
和dtype
這兩個分不太清,它們之間的區別在哪裡啊?求詳解,十分感謝。
%matplotlib inlineimport d2lzh as d2lfrom mxnet.gluon import data as gdataimport sysimport timemnist_train = gdata.vision.FashionMNIST(train=True)mnist_test = gdata.vision.FashionMNIST(train=False)feature, label = mnist_train[0]print(label)print(type(label))print(label.dtype)