and everything seemed to be working fine. But when I repeat that process on the same net the output is always the same with the former one. Is there a way to prevent this, or what's the right way (if I'm not doing things right) to conduct that process?
Aske Rasch Lejbølle
unread,
Jan 8, 2016, 4:56:15 AM1/8/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Caffe Users
After running the network you need to copy the output to a new variable. What I do is:
net.blobs['data'].data[...] = whatever
out = net.forward()
prob = out['prob'][...].copy() (or whatever layer you want output from)
Hope this helps.
Jan C Peters
unread,
Jan 14, 2016, 8:59:50 AM1/14/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Caffe Users
Yes, I too suspect that you are using "out" again without copying the results first. Your last line out= net.blobs['(last layer)'] does not copy anything, it just creates a reference (or "pointer" if you will) called "out" to a blob datastructure. If the blob changes, out also changes, because it points only to the location of the data. Array data is only copied if requested explicitly (with .copy as suggested above) or when slicing the array.