progress save

This commit is contained in:
2023-02-22 21:06:41 +00:00
parent c5d576f11f
commit c1113379ec
4 changed files with 36 additions and 18 deletions
-6
View File
@@ -89,7 +89,6 @@ def train_step(batch):
pred, mean, logvar = model([uv_orig, batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']], training=True)
mesh_pred = uv2mesh(pred)
mesh_pred = smoother(mesh_pred, training=True)
if config['use_skinning']:
shape = batch['pose_shape'][:, 72:]
@@ -148,7 +147,6 @@ def valid_step(batch):
pred, mean, logvar = model([uv_orig, batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']], training=False)
mesh_pred = uv2mesh(pred)
mesh_pred = smoother(mesh_pred, training=False)
if config['use_skinning']:
shape = batch['pose_shape'][:, 72:]
@@ -259,7 +257,6 @@ def plot_everything(batch: dict, type: str):
pred, mean, logvar = model([uv_orig, batch['uv_static'], batch['uv_body_posed'], batch['uv_curvature'], batch['uv_mask']], training=False)
mesh_pred = uv2mesh(pred)
mesh_pred = smoother(mesh_pred, training=False).numpy()
orig_img = uv_orig
uv_static_img = batch['uv_static']
@@ -432,8 +429,6 @@ def sample(folder):
def test():
str_split = config['name'].split('_')
test_idx = str_split.index('test')
@@ -524,7 +519,6 @@ if __name__ == '__main__':
is_cape=config['is_cape'])
model = CVAE(config)
smoother = Smoother()
optimizer = tf.optimizers.Adam(learning_rate=config['lr'])
balancing_activated_step = 0