-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDataSetInfoAbstractClass.py
More file actions
72 lines (61 loc) · 3 KB
/
DataSetInfoAbstractClass.py
File metadata and controls
72 lines (61 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
"""
shared-latent-space/DataSetInfoAbstractClass.py
This class defines an abstract class which is specific to a given
type of data. Each data set should have its own implementation of
this data set which defines both the functions load() and visualize().
These functions are then used in shared_vae_class.py
Author: Chris Williams
Date: 5/22/18
"""
from abc import ABCMeta, abstractmethod
class dataSetInfoAbstract(object):
__metaclass__ = ABCMeta
@abstractmethod
def load(self):
"""
Loads the testing and training data from pickle files.
This needs to return the specified data.
Args: None
Returns: (Float array, Float array, Float array, Float array)
This should return left training data, left testing data,
right training data, right testing data
"""
return
@abstractmethod
def visualize(self, randIndexes, rightDomain, right_decoded_imgs,
rightToLeftCycle, right_generatedImgs, leftToRightImgs,
leftDomain, left_decoded_imgs, leftToRightCycle,
left_generatedImgs, rightToLeftImgs, params, n=10):
"""
Visualizes all of the data passed to it. This does not need to return
anything.
Args:
randIndexes (array of ints): Random points to portray,
but same for each set of data
rightDomain (array of floats): Right input.
right_decoded_imgs (array of floats): Right input
encoded and decoded.
rightToLeftCycle (array of floats): Right input
encoded and decoded as left,
then encoded and decoded as
right.
right_generatedImgs (array of floats): Random encoded points
decoded as right.
leftToRightImgs (array of floats): Left input encoded and decoded
as right.
leftDomain (array of floats): Left input.
left_decoded_imgs (array of floats): Left input
encoded and decoded.
leftToRightCycle (array of floats): Left input
encoded and decoded as right,
then encoded and decoded as
left.
left_generatedImgs (array of floats): Random encoded points
decoded as left.
rightToLeftImgs (array of floats): Right input encoded and decoded
as left.
params (model_parameters): Parameters of the model.
n (int): Defaults to 10, number of visualizations.
Returns: None
"""
return