Skip to content

Commit

Permalink
fixed bug in import
Browse files Browse the repository at this point in the history
  • Loading branch information
amosgropp committed Jan 23, 2021
1 parent 4b72dc0 commit cded34e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
7 changes: 6 additions & 1 deletion code/preprocess/dfaust.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import os
import sys
project_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
sys.path.append(project_dir)
os.chdir(project_dir)
from __future__ import print_function
import argparse

Expand Down Expand Up @@ -93,4 +98,4 @@

np.save(output_file + '_normalization.npy', {"center":center,"scale":scale})

print ("end!")
print ("end!")
1 change: 0 additions & 1 deletion code/reconstruction/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
project_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
sys.path.append(project_dir)
os.chdir(project_dir)
import os
from datetime import datetime
from pyhocon import ConfigFactory
import numpy as np
Expand Down
4 changes: 4 additions & 0 deletions code/shapespace/eval.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import argparse
import os
import sys
project_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
sys.path.append(project_dir)
os.chdir(project_dir)
import json
import utils.general as utils
import torch
Expand Down
6 changes: 5 additions & 1 deletion code/shapespace/interpolate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import argparse
import os
import sys
project_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
sys.path.append(project_dir)
os.chdir(project_dir)
import argparse
import json
import utils.general as utils
import torch
Expand Down
7 changes: 6 additions & 1 deletion code/shapespace/latent_optimizer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import os
import sys
project_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
sys.path.append(project_dir)
os.chdir(project_dir)
import torch
from model.network import gradient
from model.sample import Sampler
Expand Down Expand Up @@ -66,4 +71,4 @@ def optimize_latent(points, normals, conf, num_of_iterations, network, lr=1.0e-2

print('latent loss iter {0}:{1}'.format(i, loss.item()))

return latent.unsqueeze(0)
return latent.unsqueeze(0)
4 changes: 3 additions & 1 deletion code/shapespace/train.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
import sys
import os
project_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
sys.path.append(project_dir)
os.chdir(project_dir)
from datetime import datetime
from pyhocon import ConfigFactory
from time import time
Expand Down

0 comments on commit cded34e

Please sign in to comment.