mirror of
https://github.com/clearml/clearml
synced 2025-03-03 10:42:00 +00:00
Convert ndarray to histogram for axis to get rid of warning in tensorflow binding
This commit is contained in:
parent
163ace8856
commit
073f4c308d
@ -51,8 +51,8 @@ class TensorBoardImage(TensorBoard):
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(description='Keras MNIST Example')
|
||||
parser.add_argument('--batch-size', type=int, default=128, help='input batch size for training (default: 64)')
|
||||
parser.add_argument('--epochs', type=int, default=6, help='number of epochs to train (default: 10)')
|
||||
parser.add_argument('--batch-size', type=int, default=128, help='input batch size for training (default: 128)')
|
||||
parser.add_argument('--epochs', type=int, default=6, help='number of epochs to train (default: 6)')
|
||||
args = parser.parse_args()
|
||||
|
||||
# the data, shuffled and split between train and test sets
|
||||
|
@ -1026,6 +1026,10 @@ class PatchTensorFlowEager(object):
|
||||
event_writer._add_histogram(tag=tag, step=step, histo_data=hist_data)
|
||||
return
|
||||
|
||||
if isinstance(hist_data, np.ndarray):
|
||||
hist_data = np.histogram(hist_data)
|
||||
histo_data = {'bucketLimit': hist_data[1].tolist(), 'bucket': hist_data[0].tolist()}
|
||||
else:
|
||||
# prepare the dictionary, assume numpy
|
||||
# histo_data['bucketLimit'] is the histogram bucket right side limit, meaning X axis
|
||||
# histo_data['bucket'] is the histogram height, meaning the Y axis
|
||||
|
Loading…
Reference in New Issue
Block a user