/// <summary> /// Creates connections between two feature maps - not used??? /// </summary> /// <param name="fromLayer"> parent layer for from feature map </param> /// <param name="toLayer"> parent layer for to feature map </param> /// <param name="fromFeatureMapIndex"> index of from feature map </param> /// <param name="toFeatureMapIndex"> index of to feature map </param> public static void connectFeatureMaps(FeatureMapsLayer fromLayer, FeatureMapsLayer toLayer, int fromFeatureMapIndex, int toFeatureMapIndex) { FeatureMapLayer fromMap = fromLayer.getFeatureMap(fromFeatureMapIndex); FeatureMapLayer toMap = toLayer.getFeatureMap(toFeatureMapIndex); toLayer.connectMaps(fromMap, toMap); }
/// <summary> /// Creates full connectivity between feature maps in two layers /// </summary> /// <param name="fromLayer"> from feature maps layer </param> /// <param name="toLayer"> to feature maps layer </param> public static void fullConnectMapLayers(FeatureMapsLayer fromLayer, FeatureMapsLayer toLayer) { if (toLayer is ConvolutionalLayer) { for (int i = 0; i < fromLayer.NumberOfMaps; i++) { for (int j = 0; j < toLayer.NumberOfMaps; j++) { FeatureMapLayer fromMap = fromLayer.getFeatureMap(i); FeatureMapLayer toMap = toLayer.getFeatureMap(j); toLayer.connectMaps(fromMap, toMap); // da li treba svaka sa svakom ??? } } } // ???? CHECK: da li je ovo dobro else if (toLayer is PoolingLayer) { for (int i = 0; i < toLayer.NumberOfMaps; i++) { FeatureMapLayer fromMap = fromLayer.getFeatureMap(i); FeatureMapLayer toMap = toLayer.getFeatureMap(i); toLayer.connectMaps(fromMap, toMap); } } }