Groups
Sign in
Groups
Caffe Users
Conversations
Labels
About
Send feedback
Help
subtract output of two layers
1,164 views
eltwise
layer
subtract
Skip to first unread message
Peter Neher
unread,
Jan 7, 2016, 7:08:12 AM
1/7/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
Hi everyone,
I was wondering if this is the right way to get the difference-vector of the output vectors of two fully connected layers:
layer
{
name: "eltwise_layer"
type: "Eltwise"
bottom: "ip1"
bottom: "ip2"
top: "diff"
eltwise_param {
operation: SUM
coeff: -1
}
}
Cheers,
Peter
Evan Shelhamer
unread,
Jan 9, 2016, 11:26:18 PM
1/9/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 Peter Neher, Caffe Users
That's almost it, but you need to set a coefficient for each bottom. Try
layer
{
name: "eltwise_layer"
type: "Eltwise"
bottom: "ip1"
bottom: "ip2"
top: "diff"
eltwise_param {
operation: SUM
coeff: 1
coeff: -1
}
}
to compute ip1 - ip2.
Evan Shelhamer
Peter Neher
unread,
Jan 11, 2016, 1:56:43 AM
1/11/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, pne...@gmail.com
Seems to work, thank you!
Reply all
Reply to author
Forward
0 new messages