|
|
|
@ -397,17 +397,13 @@ class Train (GNet):
|
|
|
|
|
labels_placeholder = tf.compat.v1.placeholder(shape=self._LABEL.shape, dtype=tf.float32)
|
|
|
|
|
dataset = tf.data.Dataset.from_tensor_slices((features_placeholder, labels_placeholder))
|
|
|
|
|
dataset = dataset.repeat(10000)
|
|
|
|
|
dataset = dataset.batch(batch_size=self.BATCHSIZE_PER_GPU)
|
|
|
|
|
dataset = dataset.batch(batch_size=3000)
|
|
|
|
|
dataset = dataset.prefetch(1)
|
|
|
|
|
# iterator = dataset.make_initializable_iterator()
|
|
|
|
|
iterator = tf.compat.v1.data.make_initializable_iterator(dataset)
|
|
|
|
|
# next_element = iterator.get_next()
|
|
|
|
|
# init_op = iterator.initializer
|
|
|
|
|
return iterator, features_placeholder, labels_placeholder
|
|
|
|
|
|
|
|
|
|
def network(self,**args):
|
|
|
|
|
# def graph(stage, opt):
|
|
|
|
|
# global_step = tf.get_variable(stage+'_step', [], initializer=tf.constant_initializer(0), trainable=False)
|
|
|
|
|
stage = args['stage']
|
|
|
|
|
opt = args['opt']
|
|
|
|
|
tower_grads = []
|
|
|
|
@ -540,8 +536,6 @@ class Predict(GNet):
|
|
|
|
|
# The code below will insure we have some acceptable cardinal relationships between id and synthetic values
|
|
|
|
|
#
|
|
|
|
|
df = ( pd.DataFrame(np.round(f).astype(np.int32)))
|
|
|
|
|
print (df.head())
|
|
|
|
|
print ()
|
|
|
|
|
p = 0 not in df.sum(axis=1).values
|
|
|
|
|
|
|
|
|
|
if p:
|
|
|
|
|