MCPcopy Create free account
hub / github.com/bytedance/StyleSSP / encode_with_intermediate

Method encode_with_intermediate

src/evaluate/net.py:81–86  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

79
80 # extract relu1_1, relu2_1, relu3_1, relu4_1 from input image
81 def encode_with_intermediate(self, input):
82 results = [input]
83 for i in range(4):
84 func = getattr(self, 'enc_{:d}'.format(i + 1))
85 results.append(func(results[-1]))
86 return results[1:]
87
88 def calc_mean_std(self, feat, eps=1e-5):
89 # eps is a small value added to the variance to avoid divide-by-zero.

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected