Skip to content
Permalink
b9be5f63b6
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
32 lines (25 sloc) 1.05 KB
import tensorflow as tf
from config import parse_args
from tfsolver import TFSolver
from dataset import DatasetFactory
from network_factory import cls_network
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
# configs
FLAGS = parse_args()
def get_output(dataset='test', training=False, reuse=False, task = 'class'):
flags_data = FLAGS.DATA.train if dataset == 'train' else FLAGS.DATA.test
y_type = 'int' if task == 'class' else 'float'
octree, label = DatasetFactory(flags_data, y_type=y_type)()
logit = cls_network(octree, FLAGS.MODEL, training, reuse)
return [logit, label]
def check_input(dataset='test', training=False, reuse=False, task = 'class'):
flags_data = FLAGS.DATA.train if dataset == 'train' else FLAGS.DATA.test
y_type = 'int' if task == 'class' else 'float'
octree, label = DatasetFactory(flags_data, y_type=y_type)()
return octree, label
# run the experiments
if __name__ == '__main__':
# solver = TFSolver(FLAGS.SOLVER, check_input)
# solver.check_grids()
solver = TFSolver(FLAGS, get_output)
solver.test_ave()