bug fix: index number or context
This commit is contained in:
parent
f9496ed806
commit
af6ab356d8
|
@ -424,7 +424,7 @@ class Train (GNet):
|
||||||
dataset = tf.data.Dataset.from_tensor_slices(features_placeholder)
|
dataset = tf.data.Dataset.from_tensor_slices(features_placeholder)
|
||||||
# labels_placeholder = None
|
# labels_placeholder = None
|
||||||
dataset = dataset.repeat(10000)
|
dataset = dataset.repeat(10000)
|
||||||
print ([' ******* ',self.BATCHSIZE_PER_GPU])
|
|
||||||
dataset = dataset.batch(batch_size=self.BATCHSIZE_PER_GPU)
|
dataset = dataset.batch(batch_size=self.BATCHSIZE_PER_GPU)
|
||||||
dataset = dataset.prefetch(1)
|
dataset = dataset.prefetch(1)
|
||||||
# iterator = dataset.make_initializable_iterator()
|
# iterator = dataset.make_initializable_iterator()
|
||||||
|
|
15
pipeline.py
15
pipeline.py
|
@ -244,8 +244,19 @@ if __name__ == '__main__' :
|
||||||
f = open (filename)
|
f = open (filename)
|
||||||
PIPELINE = json.loads(f.read())
|
PIPELINE = json.loads(f.read())
|
||||||
f.close()
|
f.close()
|
||||||
index = int(SYS_ARGS['index']) if 'index' in SYS_ARGS else 0
|
index = SYS_ARGS['index']
|
||||||
|
if index.isnumeric() :
|
||||||
|
index = int(SYS_ARGS['index'])
|
||||||
|
else:
|
||||||
|
#
|
||||||
|
# The index provided is a key to a pipeline entry mainly the context
|
||||||
|
#
|
||||||
|
N = len(PIPELINE)
|
||||||
|
f = [i for i in range(0,N) if PIPELINE[i]['context'] == index]
|
||||||
|
index = f[0] if f else 0
|
||||||
|
#
|
||||||
|
# print
|
||||||
|
print ("..::: ",PIPELINE[index]['context'])
|
||||||
args = (PIPELINE[index])
|
args = (PIPELINE[index])
|
||||||
|
|
||||||
args = dict(args,**SYS_ARGS)
|
args = dict(args,**SYS_ARGS)
|
||||||
|
|
Loading…
Reference in New Issue