public override FloatTensor Forward(FloatTensor input) { FloatTensor unbiased_output = input.MM(_weights); FloatTensor output = unbiased_output.Add(_bias.Expand(unbiased_output.Shape).Contiguous()); activation = output.Id; return(output); }
public override FloatTensor Forward(FloatTensor input) { FloatTensor output; if (_fast) { output = input.MMT(_weights); } else { output = input.MM(_weights); }; if (_biased) { output = output.Add(_bias.Expand(output.Shape).Contiguous()); } ; activation = output.Id; return(output); }