def printNet(self, f): # only complete if we've forwardt stride=1 print("ConvTranspose2D", file=f) print(self.activation + ", filters={}, kernel_size={}, input_shape={}".format( self.out_channels, list(self.kernel_size), list(self.prev)), file=f) print(h.printListsNumpy([[list(p) for p in l] for l in self.weight.permute(2, 3, 1, 0).data ]), file=f) print(h.printNumpy(self.bias), file=f)
def printNet(self, f): # only complete if we've forwardt stride=1 print("Conv2D", file=f) sz = list(self.prev) print( self.activation + ", filters={}, kernel_size={}, input_shape={}, stride={}, padding={}" .format(self.out_channels, [self.kernel_size, self.kernel_size], list(reversed(sz)), [self.stride, self.stride], self.padding), file=f) print(h.printListsNumpy([[list(p) for p in l] for l in self.weight.permute(2, 3, 1, 0).data ]), file=f) print(h.printNumpy( self.bias if self.bias is not None else h.dten(self.out_channels)), file=f)
def printNet(self, f): print("Linear(" + str(self.out_neurons) + ")") print(h.printListsNumpy(list(self.weight.transpose(1, 0).data)), file=f) print(h.printNumpy(self.bias), file=f)
def printNet(self, f): print(h.printListsNumpy(list(self.weight.transpose(1, 0).data)), file=f) print(h.printNumpy(self.bias), file=f)