def __init__(self, opts, params): self.opts = opts self.dataset_params = params self.data_dir = params.data_dir self.dtype = params.dtype self.n_views = params.views[-1] self.n_pts = params.points[-1] d = self.n_pts * self.n_views e = params.descriptor_dim p = params.points[-1] f = opts.final_embedding_dim self.features = { 'InitEmbeddings': tf_helpers.TensorFeature( key='InitEmbeddings', shape=[d, e], dtype=self.dtype, description='Initial embeddings for optimization'), 'AdjMat': tf_helpers.TensorFeature(key='AdjMat', shape=[d, d], dtype=self.dtype, description='Adjacency matrix for graph'), 'Degrees': tf_helpers.TensorFeature(key='Degrees', shape=[d, d], dtype=self.dtype, description='Degree matrix for graph'), 'Laplacian': tf_helpers.TensorFeature( key='Laplacian', shape=[d, d], dtype=self.dtype, description='Alternate Laplacian matrix for graph'), 'TrueEmbedding': tf_helpers.TensorFeature( key='TrueEmbedding', shape=[d, p], dtype=self.dtype, description='True values for the low dimensional embedding'), 'NumViews': tf_helpers.Int64Feature( key='NumViews', description='Number of views used in this example'), 'NumPoints': tf_helpers.Int64Feature( key='NumPoints', description='Number of points used in this example'), }
def __init__(self, opts, params): super(GraphSimDataset, self).__init__(opts, params) d = self.n_pts * self.n_views self.features['Mask'] = \ tf_helpers.TensorFeature( key='Mask', shape=[d, d], dtype=self.dtype, description='Mask for valid values of matrix') self.features['MaskOffset'] = \ tf_helpers.TensorFeature( key='MaskOffset', shape=[d, d], dtype=self.dtype, description='Mask offset for loss')
def __init__(self, opts, params): super().__init__(opts, params) self.features.update({ 'rots': tf_helpers.TensorFeature(key='rots', shape=[self.tuple_size, 3, 3], dtype=self.dtype, description='Rotations of the cameras'), 'trans': tf_helpers.TensorFeature( key='trans', shape=[self.tuple_size, 3], dtype=self.dtype, description='Translations of the cameras'), })
def __init__(self, opts, params): self.opts = opts self.dataset_params = params self.data_dir = params.data_dir self.dtype = params.dtype p = params.points[-1] v = params.views[-1] self.n_views = v self.n_pts = p d = p * v e = params.descriptor_dim # GraphsTuple(nodes=nodes, # edges=edges, # globals=globals, # receivers=receivers, # senders=senders, # n_node=n_node, # n_edge=n_edge) self.features = { 'n_node': tf_helpers.Int64Feature( key='n_node', dtype='int32', description='Number of nodes we are using'), 'nodes': tf_helpers.TensorFeature( key='nodes', shape=[d, e], dtype=self.dtype, description='Initial embeddings for optimization'), 'n_edge': tf_helpers.Int64Feature( key='n_edge', dtype='int32', description='Number of edges in this graph'), 'globals': tf_helpers.VarLenFloatFeature(key='globals', shape=[None], description='Edge features'), 'edges': tf_helpers.VarLenFloatFeature(key='edges', shape=[None, 1], description='Edge features'), 'receivers': tf_helpers.VarLenIntListFeature( key='receivers', dtype='int32', description='Recieving nodes for edges'), 'senders': tf_helpers.VarLenIntListFeature( key='senders', dtype='int32', description='Sending nodes for edges'), }
def __init__(self, opts, params): super(GeomKNNRome16KDataset, self).__init__(opts, params, tuple_size=params.views[-1]) d = self.n_pts * self.n_views e = params.descriptor_dim self.features.update({ 'InitEmbeddings': tf_helpers.TensorFeature( key='InitEmbeddings', shape=[d, e + 2 + 1 + 1], dtype=self.dtype, description='Initial embeddings for optimization'), 'Rotations': tf_helpers.TensorFeature(key='Rotations', shape=[self.tuple_size, 3, 3], dtype=self.dtype, description='Mask offset for loss'), 'Translations': tf_helpers.TensorFeature(key='Translations', shape=[self.tuple_size, 3], dtype=self.dtype, description='Mask offset for loss'), })
def __init__(self, opts, params): """ Inputs: - opts (options) - object with all relevant options stored - params (DatasetParams) - object with all dataset parameters stored Outputs: GraphSimDataset """ self.opts = opts self.dataset_params = params self.data_dir = params.data_dir self.dtype = params.dtype self.n_views = np.random.randint(params.views[0], params.views[1] + 1) self.n_pts = np.random.randint(params.points[0], params.points[1] + 1) d = self.n_pts * self.n_views e = params.descriptor_dim p = params.points[-1] f = opts.final_embedding_dim self.features = { 'InitEmbeddings': tf_helpers.TensorFeature( key='InitEmbeddings', shape=[d, e], dtype=self.dtype, description='Initial embeddings for optimization'), 'AdjMat': tf_helpers.TensorFeature(key='AdjMat', shape=[d, d], dtype=self.dtype, description='Adjacency matrix for graph'), 'Degrees': tf_helpers.TensorFeature(key='Degrees', shape=[d, d], dtype=self.dtype, description='Degree matrix for graph'), 'Laplacian': tf_helpers.TensorFeature( key='Laplacian', shape=[d, d], dtype=self.dtype, description='Alternate Laplacian matrix for graph'), 'Mask': tf_helpers.TensorFeature( key='Mask', shape=[d, d], dtype=self.dtype, description='Mask for valid values of matrix'), 'MaskOffset': tf_helpers.TensorFeature(key='MaskOffset', shape=[d, d], dtype=self.dtype, description='Mask offset for loss'), 'TrueEmbedding': tf_helpers.TensorFeature( key='TrueEmbedding', shape=[d, p], dtype=self.dtype, description='True values for the low dimensional embedding'), 'NumViews': tf_helpers.Int64Feature( key='NumViews', description='Number of views used in this example'), 'NumPoints': tf_helpers.Int64Feature( key='NumPoints', description='Number of points used in this example'), }