/// <summary> /// Get networks on specific devices /// </summary> private (IEncoder, IWeightTensor, IFeedForwardLayer, IWeightTensor, IWeightTensor) GetNetworksOnDeviceAt(int deviceIdIdx) { return(m_encoder.GetNetworkOnDevice(deviceIdIdx), m_srcEmbedding.GetNetworkOnDevice(deviceIdIdx), m_encoderFFLayer.GetNetworkOnDevice(deviceIdIdx), m_posEmbedding?.GetNetworkOnDevice(deviceIdIdx), m_segmentEmbedding?.GetNetworkOnDevice(deviceIdIdx)); }
/// <summary> /// Get networks on specific devices /// </summary> /// <param name="deviceIdIdx"></param> /// <returns></returns> private (IEncoder, IWeightTensor, List <IFeedForwardLayer>, IWeightTensor, IWeightTensor) GetNetworksOnDeviceAt(int deviceIdIdx) { List <IFeedForwardLayer> feedForwardLayers = new List <IFeedForwardLayer>(); foreach (var item in m_encoderFFLayer) { feedForwardLayers.Add(item.GetNetworkOnDevice(deviceIdIdx)); } return(m_encoder.GetNetworkOnDevice(deviceIdIdx), m_srcEmbedding.GetNetworkOnDevice(deviceIdIdx), feedForwardLayers, m_posEmbedding?.GetNetworkOnDevice(deviceIdIdx), m_segmentEmbedding?.GetNetworkOnDevice(deviceIdIdx)); }