Skip to content

Questions about channel identity LBP loss #316

Closed
@kice

Description

if i == 1 then
-- channel identity
for j = 1, ch do
filter.weight[i]:fill(0)
filter.weight[i][i][math.floor(k/2)+1][math.floor(k/2)+1] = 1
end
end

I think you want to create an identity for input channels (pixelwise loss), but this section only make identity for the first channel.

if i == 1 then
    -- identity for input channels of first layer
    for j = 1, ch do
        filter.weight[j]:fill(0)
        filter.weight[j][j][math.floor(k/2)+1][math.floor(k/2)+1] = 1
    end
end

where filter.weight[i] change into filter.weight[j], use j instad of i, which always is 1 after the if conditation.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions