artvandelay / Deep_Inside_Convolutional_Networks

This is a caffe implementation to visualize the learnt model
MIT License
61 stars 32 forks source link

ValueError: could not broadcast input array from shape(1000,1,1) into shape (1,1000) #5

Open zhoafan opened 7 years ago

zhoafan commented 7 years ago

hi, I am trying to use your code for the same purpose. But there is a error in bw=net.backward(**{net.outputs[0]: caffeLabel}) ValueError: could not broadcast input array from shape(1000,1,1) into shape (1,1000). Can you tell me the reason. Thank you. Looking forward to your reply.

zhaoyang1708 commented 7 years ago

I have the same problem.

billhhh commented 7 years ago

change these 2 codes into

caffeLabel = np.zeros((1,1,1000)) caffeLabel[0,0,label_index] = 1;