Closed ghost closed 4 years ago
@Wan-Dou The data type that is being passed is of Type Tensor, which as of now is not a supported Data type. The supported Data types are:
I experienced a similar issue when running the MNIST example -- how should it be resolved in the context of the example? It seems that early on the data is read in using the ToTensor() function? EDIT-- I just ended up casting the X and y datasets to np.array and that solved the issue
Also, this library looks really promising and I'm excited to use it! Thank you for all your work on this!
Hi!
Sorry for the relatively late answer, @nawabhussain is totally right. Currently, modAL does not support the torch.Tensor
datatype. However, this would be a useful feature, so I am opening an issue on this and close this one. Let me know if there is anything else!
epoch train_loss dur
Query no. 1 Traceback (most recent call last): File "E:/PycharmProjects/pytorch/3另另另mixMatch-master/mixMatch-master/1.py", line 82, in
query_idx, query_instance = learner.query(X_pool, n_instances=100)
File "C:\software\anaconda3\envs\pytorch\lib\site-packages\modAL\models\base.py", line 269, in query
return query_result, retrieve_rows(X_pool, query_result)
File "C:\software\anaconda3\envs\pytorch\lib\site-packages\modAL\utils\data.py", line 101, in retrieve_rows
raise TypeError('%s datatype is not supported' % type(X))
TypeError: <class 'torch.Tensor'> datatype is not supported