def get_channel(model, dataset, channel, cost, batch_size):
 monitor = Monitor(model)
 monitor.setup(dataset=dataset, cost=cost, batch_size=batch_size)
 monitor()
 channels = monitor.channels
 channel = channels[channel]
 val_record = channel.val_record
 (value,) = val_record
 return value

def get_channel ( model , dataset , channel , cost , batch_size ) : monitor = Monitor ( model ) monitor . setup ( dataset = dataset , cost = cost , batch_size = batch_size ) monitor ( ) channels = monitor . channels channel = channels [ channel ] val_record = channel . val_record ( value , ) = val_record return value
make a temporary monitor and return the value of a channel in it .