MCPcopy
hub / github.com/Turing-Project/WriteGPT / shape

Method shape

LanguageNetwork/BERT/models/neural.py:142–145  ·  view source on GitHub ↗

projection

(x)

Source from the content-addressed store, hash-verified

140 query_len = query.size(1)
141
142 def shape(x):
143 """ projection """
144 return x.view(batch_size, -1, head_count, dim_per_head) \
145 .transpose(1, 2)
146
147 def unshape(x):
148 """ compute context """

Callers 3

get_shape_listFunction · 0.80
get_shape_listFunction · 0.80
get_shape_listFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected