MCPcopy Create free account
hub / github.com/Sin3DM/Sin3DM / __init__

Method __init__

src/encoding/model.py:16–49  ·  view source on GitHub ↗
(self, log_dir, args)

Source from the content-addressed store, hash-verified

14
15class ShapeAutoEncoder(object):
16 def __init__(self, log_dir, args):
17 self.log_dir = log_dir
18
19 self.batch_size = args.enc_batch_size
20 self.n_iters = args.enc_n_iters
21 self.vol_ratio = args.vol_ratio
22
23 self.fm_reso = args.fm_reso if hasattr(args, "fm_reso") else 128
24
25 self.data_type = args.data_type
26 self.sdf_loss_type = args.sdf_loss
27 self.tex_loss_type = args.tex_loss
28
29 self.device = dist_util.dev()
30 self.tex_weight = args.tex_weight
31 self.tex_threshold_ratio = args.tex_threshold_ratio
32
33 self.sdf_renorm = args.sdf_renorm
34
35 self.init_lr = args.enc_lr
36 self.lr_split = args.enc_lr_split if hasattr(args, "enc_lr_split") else -1
37 self.min_lr_ratio = args.enc_lr_decay if hasattr(args, "enc_lr_decay") else 0.01
38
39 # build network
40 self.net = get_networks(args).to(self.device)
41
42 # input data information
43 self.Ka = None
44 self.Kd = None
45 self.Ks = None
46 self.Ns = None
47 self.aabb = None
48 self.featmap_size = None
49 self.sdf_threshold = None
50
51 def _load_data(self, path, sdf_renorm=False):
52 data = np.load(path)

Callers

nothing calls this directly

Calls 1

get_networksFunction · 0.85

Tested by

no test coverage detected