code: function Convolution(kernels, size, count, stride, bias, margin){
  	var N, K;
  
  	if(type(bias) === "Tensor"){
  		this.bias = bias;
  		console.assert(this.bias.shape[0] === 1, "Bias Tensor must have first dimension of length one.");
  		K = this.bias.shape[1];
  	} else {
  		K = bias.length;
  		this.bias = new Tensor([1, K], bias);
  	}
  
  
  	// transpose kernels are required
  	if(type(kernels) === "Tensor"){
  		console.assert(this.kernels.shape[0] === K, "Kernel Tensor first dimension must equal Bias Tensor second dimension.");
  		this.kernels = kernels;
  	} else {
  		N = (kernels.length / K) | 0;
  		console.assert(K * N === kernels.length, "Kernel Array must have length equal to a multiple of bias array length.");
  
  		this.kernels = new Tensor([K, N], kernels);
  	}
  
  	// kernel patch size
  	this.size = size;
  	// kernel count
  	this.count = count;
  
  	// stride between kernel patches
  	this.stride = stride;
  	// margin to add
  	this.margin = margin;
  }
docs: /* Create a convolution layer
  
  kernels must be input in transposed form