Closed mohamed945 closed 6 years ago
That line looks like it should be: loss_summary = tf.summary.scalar(['logistic_loss', 'loss'], [train_logistic_loss, train_loss], collections=[])
On Thu, May 11, 2017 at 11:01 AM, mohamed945 notifications@github.com wrote:
hello, I'm trying to test your code, but i come with this error,
File "/train.py", line 148, in train loss_summary = tf.summary.scalar()(['logistic_loss', 'loss'], [train_logistic_loss, train_loss], collections=[]) TypeError: scalar() missing 2 required positional arguments: 'name' and 'tensor'
Thanks,
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ecobost/cnn4brca/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AJSe5rcJURcDK2coGJxWds5a3_9F-uFzks5r4zDhgaJpZM4NYN6N .
In tf 1.0,m [summary.scalar] (https://www.tensorflow.org/api_docs/python/tf/summary/scalar), receives only one argument, you would have to modify the code to have each summary sent separately, I bet the new way scalar summaries is managed is different so I would read their docs first. Or you could comment that line entirely out but hen tensorboard won't log the training loss.
hello, I'm trying to test your code, but i come with this error,
Traceback (most recent call last): File "train.py", line 174, in
train()
File "train.py", line 148, in train
loss_summary = tf.summary.scalar(['logistic_loss', 'loss'], [train_logistic_loss, train_loss], collections=[])
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/summary/summary.py", line 118, in scalar
name = _clean_tag(name)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/summary/summary.py", line 90, in _clean_tag
new_name = _INVALID_TAGCHARACTERS.sub('', name)
TypeError: expected string or bytes-like object
Thanks,