Hugging Face
Models
Datasets
Spaces
Community
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
JuyeopDang
/
KoFace-AI
like
0
Running
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
c003113
KoFace-AI
/
helper
/
util.py
JuyeopDang
Upload 35 files
5ab5cab
verified
3 months ago
raw
Copy download link
history
blame
Safe
129 Bytes
def
extract
(
a, t, x_shape
):
b, *_ = t.shape
out = a.gather(-
1
, t)
return
out.reshape(b, *((
1
,) * (
len
(x_shape) -
1
)))