def forward_pass(self, input_data, convert_to_class=False):
"""
Allow the implementer to quickly get outputs from the network.
Args:
input_data: Numpy matrix to make the predictions on
convert_to_class: If true, output the class
with highest probability
Returns: Numpy matrix with the output probabilities
with each class unless otherwise specified.
"""
if convert_to_class:
return get_class(self.output(input_data))
else:
return self.output(input_data)
评论列表
文章目录