Skip to content

log the output of process_function #1534

Answered by vfdev-5
ydcjeff asked this question in Q&A
Discussion options

You must be logged in to vote

@ydcjeff how about this example :

wandb_logger.attach_output_handler(
trainer,
event_name=Events.ITERATION_COMPLETED(every=100),
tag="training",
output_transform=lambda loss: {"batchloss": loss},
)

See also OutputHandler docs about output_transform.

In this case you will log loss value on the iteration and not averaged one. If you like to compute an average value, then use RunningAverage for that and then metric_names from OutputHandler.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ydcjeff
Comment options

Answer selected by ydcjeff
Comment options

You must be logged in to vote
1 reply
@sdesrozis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants