MCPcopy Create free account
hub / github.com/InnerPeace-Wu/CapsNet-tensorflow / squash

Function squash

code/utils.py:14–32  ·  view source on GitHub ↗

squash function for keep the length of capsules between 0 - 1 :arg cap_input: total input of capsules, with shape: [None, h, w, c] or [None, n, d] :return cap_output: output of each capsules, which has the shape as cap_input

(cap_input)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

_capsuleMethod · 0.90
bodyMethod · 0.90
_dynamic_routingV1Method · 0.90
_build_netMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected