CURL icon indicating copy to clipboard operation
CURL copied to clipboard

Seems like there needs to be some lines to be changed

Open ooodragon94 opened this issue 4 years ago • 1 comments

File "/*/CURL/ImageNet/released_model/pruned_model.py", line 76, in __init__         
    index_list = list(np.load('index.npy'))                                                 
  File "/opt/conda/lib/python3.8/site-packages/numpy/lib/npyio.py", line 439, in load             
    return format.read_array(fid, allow_pickle=allow_pickle,                                      
  File "/opt/conda/lib/python3.8/site-packages/numpy/lib/format.py", line 727, in read_array     
    raise ValueError("Object arrays cannot be loaded when "                               
ValueError: Object arrays cannot be loaded when allow_pickle=False 

so setting line 76 of pruned_model.py to

index_list = list(np.load('index.npy', allow_pickle=True)) did the work. Not sure if it is safe to do this though

ooodragon94 avatar Jun 25 '21 05:06 ooodragon94

Having another problem

Traceback (most recent call last):
  File "main.py", line 275, in <module>
    main()
  File "main.py", line 60, in main
    model = resnet50(model_weight, num_classes=args.class_num)
  File "/taeil/CURL/ImageNet/CURL/2_fine_tuning/pruned_model.py", line 287, in resnet50
    model = ResNet(model_weight, Bottleneck, layers, **kwargs)
  File "/taeil/CURL/ImageNet/CURL/2_fine_tuning/pruned_model.py", line 109, in __init__
    self._initialize_weights(model_weight, index_list)
  File "/taeil/CURL/ImageNet/CURL/2_fine_tuning/pruned_model.py", line 206, in _initialize_weights
    my_weight[my_keys[k_ind]] = v[hidden_ind_1]
RuntimeError: CUDA error: device-side assert triggered

any suggestions?

ooodragon94 avatar Jun 25 '21 05:06 ooodragon94