MCPcopy Create free account
hub / github.com/THUYimingLi/BackdoorBox / AutoEncoder

Function AutoEncoder

core/models/autoencoder.py:86–93  ·  view source on GitHub ↗
(img_size)

Source from the content-addressed store, hash-verified

84
85
86def AutoEncoder(img_size):
87 assert isinstance(img_size, tuple), f"img_size should be tuple, but got {type(img_size)}"
88 if img_size == (1, 28, 28):
89 return AutoEncoder1x28x28()
90 elif img_size == (3, 32, 32):
91 return AutoEncoder3x32x32()
92 else:
93 raise NotImplementedError("Unsupported img size!")
94
95
96if __name__=='__main__':

Callers 1

autoencoder.pyFile · 0.85

Calls 2

AutoEncoder1x28x28Class · 0.85
AutoEncoder3x32x32Class · 0.85

Tested by

no test coverage detected