hq-deng / RD4AD

Anomaly Detection via Reverse Distillation from One-Class Embedding
MIT License
174 stars 31 forks source link

RUN ERROE! #2

Closed pmj828 closed 2 years ago

pmj828 commented 2 years ago

Traceback (most recent call last): File "/media/pmj/e/code/anomaly_code/RD4AD-main/main.py", line 121, in train(i) File "/media/pmj/e/code/anomaly_code/RD4AD-main/main.py", line 105, in train auroc_px, auroc_sp, aupro_px = evaluation(encoder, bn, decoder, test_dataloader, device) File "/media/pmj/e/code/anomaly_code/RD4AD-main/test.py", line 89, in evaluation anomaly_map[np.newaxis,:,:])) File "/media/pmj/e/code/anomaly_code/RD4AD-main/test.py", line 355, in compute_pro df = pd.DataFrame([], columns=["pro", "fpr", "threshold"]) File "/home/pmj/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py", line 490, in init mgr = init_dict({}, index, columns, dtype=dtype) File "/home/pmj/anaconda3/lib/python3.7/site-packages/pandas/core/internals/construction.py", line 239, in init_dict val = construct_1d_arraylike_from_scalar(np.nan, len(index), nan_dtype) File "/home/pmj/anaconda3/lib/python3.7/site-packages/pandas/core/dtypes/cast.py", line 1449, in construct_1d_arraylike_from_scalar dtype = dtype.dtype AttributeError: type object 'object' has no attribute 'dtype'

pmj828 commented 2 years ago

pip install --upgrade pandas