Completes one feedforward step, ensuring net is set to evaluation model returns: network output given input x
"""
self.set_train_eval(train=False)
outs = self(x)
if type(outs) is list:
outs = [o.data for o in outs]
else:
outs = outs.data
return outs
def init_params(self):
"""
Initializes all of the model"s parameters using xavier uniform initialization.
After Change
Completes one feedforward step, ensuring net is set to evaluation model returns: network output given input x
"""
self.eval()
return self(x)
def __str__(self):
"""Overriding so that print() will print the whole network"""
s = self.conv_model.__str__() + "\n" + self.dense_model.__str__()