MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / call

Method call

tensorflow/contrib/eager/python/examples/revnet/revnet.py:96–114  ·  view source on GitHub ↗

Forward pass.

(self, inputs, training=True)

Source from the content-addressed store, hash-verified

94 return block_list
95
96 def call(self, inputs, training=True):
97 """Forward pass."""
98
99 saved_hidden = None
100 if training:
101 saved_hidden = [inputs]
102
103 h = self._init_block(inputs, training=training)
104 if training:
105 saved_hidden.append(h)
106
107 for block in self._block_list:
108 h = block(h, training=training)
109 if training:
110 saved_hidden.append(h)
111
112 logits = self._final_block(h, training=training)
113
114 return (logits, saved_hidden) if training else (logits, None)
115
116 def compute_loss(self, logits, labels):
117 """Compute cross entropy loss."""

Callers

nothing calls this directly

Calls 2

blockFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected