Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/junyanz/iGAN
/ transform
Function
transform
train_dcgan/train_dcgan_utils.py:83–87 ·
view source on GitHub ↗
(x, nc=3)
Source
from the content-addressed store, hash-verified
81
82
83
def
transform(x, nc=3):
84
if
nc == 3:
85
return
floatX(x).transpose(0, 3, 1, 2) / 127.5 - 1.
86
else
:
87
return
floatX(x).transpose(0, 3, 1, 2) / 255.0
88
89
90
def
inverse_transform(x, npx=64, nc=3):
Callers
nothing calls this directly
Calls
1
floatX
Function · 0.90
Tested by
no test coverage detected