internal override void Deserialize(byte[] bytes) { var buff = new NetworkBuffer(bytes); activationType = (ActivationType)buff.ReadInt32(); inputShape = buff.ReadShape(); outputShape = buff.ReadShape(); _weights = buff.ReadTensor(); _bias = buff.ReadTensor(); buff.Close(); }
internal override byte[] Serialize() { var buff = new NetworkBuffer(); buff.WriteInt32((int)activationType); buff.WriteShape(inputShape); buff.WriteShape(outputShape); buff.WriteTensor(_weights); buff.WriteTensor(_bias); var bytes = buff.ToBytes(); buff.Close(); return(bytes); }