Skip to content

Squashing function #1

@Ugenteraan

Description

@Ugenteraan

Line 17 in capsnet.py, shouldn't it be :
scalar_factor = vector_squared_norm / ((1 + vector_squared_norm) / tf.sqrt(vector_squared_norm + epsilon))
instead of
scalar_factor = vector_squared_norm / ((1 + vector_squared_norm) * tf.sqrt(vector_squared_norm + epsilon))
NOTE : changes from multiplication to division.
Because, from the paper, we have

(vector_squared_norm/1+vector_squared_norm) * (vector/sqrt(vector_squared_norm))

which means

((vector_squared_norm/1+vector_squared_norm)/vector_squared_norm)*vector

Metadata

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