You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now all the x2num preprocessings are in writer.py, like:
def add_scalar(self, tag, scalar_value, global_step=None):
"""Add scalar data to summary.
Args:
tag (string): Data identifier
scalar_value (float): Value to save
global_step (int): Global step value to record
"""
scalar_value = makenp(scalar_value)
assert(scalar_value.squeeze().ndim==0), 'input of add_scalar should be 0D'
self.file_writer.add_summary(scalar(tag, scalar_value), global_step)
Why not put scalar_value = makenp(scalar_value) in scalar function.
The reason I'm proposing this, is I'm using FileWriter, and I collect the summaries during forwarding the network. (Like the pipeline in tensorflow) So I will call the scalar histogram etc functions by myself. (The reason I don't use SummaryWriter is I don't want the SummaryWriter to be exposed to the model itself.)
Now, to call scalar or histogram I have to convert to numpy first, which is ok but not necessary because you can move all the x2num to summary.py.
What do you think.
The text was updated successfully, but these errors were encountered:
Now all the x2num preprocessings are in writer.py, like:
Why not put scalar_value = makenp(scalar_value) in scalar function.
The reason I'm proposing this, is I'm using FileWriter, and I collect the summaries during forwarding the network. (Like the pipeline in tensorflow) So I will call the scalar histogram etc functions by myself. (The reason I don't use SummaryWriter is I don't want the SummaryWriter to be exposed to the model itself.)
Now, to call scalar or histogram I have to convert to numpy first, which is ok but not necessary because you can move all the x2num to summary.py.
What do you think.
The text was updated successfully, but these errors were encountered: