| /** |
| * Copyright (c) 2020 CEA LIST |
| * |
| * All rights reserved. This program and the accompanying materials are |
| * made available under the terms of the Eclipse Public License v2.0 which |
| * accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| */ |
| package org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.impl; |
| |
| import org.eclipse.emf.ecore.EAttribute; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EPackage; |
| import org.eclipse.emf.ecore.EcorePackage; |
| |
| import org.eclipse.emf.ecore.impl.EPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.AIMLPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Convolution_layers.Convolution_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Convolution_layers.impl.Convolution_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.DataParallel_layers.DataParallel_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.DataParallel_layers.impl.DataParallel_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Distance_functions.Distance_functionsPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Distance_functions.impl.Distance_functionsPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Dropout_layers.Dropout_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Dropout_layers.impl.Dropout_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Layer_weight_constraints.Layer_weight_constraintsPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Layer_weight_constraints.impl.Layer_weight_constraintsPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Layer_weight_initializers.Layer_weight_initializersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Layer_weight_initializers.impl.Layer_weight_initializersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Layer_weight_regularizers.Layer_weight_regularizersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Layer_weight_regularizers.impl.Layer_weight_regularizersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Linear_layers.Linear_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Linear_layers.impl.Linear_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Loss_functions.Loss_functionsPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Loss_functions.impl.Loss_functionsPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Module.ModulePackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Module.impl.ModulePackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.NonLinearActivations.NonLinearActivationsPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.NonLinearActivations.impl.NonLinearActivationsPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.BatchNorm1d; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.BatchNorm2d; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.BatchNorm3d; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.GroupNorm; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.InstanceNorm1d; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.InstanceNorm2d; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.InstanceNorm3d; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.LayerNorm; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.LocalResponseNorm; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.Normalization_layers; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.Normalization_layersFactory; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.Normalization_layersPackage; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.Normalization_layers_1; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.Normalization_layers_1_1; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.Normalization_layers_1_1_1; |
| import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.SyncBatchNorm; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Padding_layers.Padding_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Padding_layers.impl.Padding_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Pooling_layers.Pooling_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Pooling_layers.impl.Pooling_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Recurrent_layers.Recurrent_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Recurrent_layers.impl.Recurrent_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.SoftMinMaxActivations.SoftMinMaxActivationsPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.SoftMinMaxActivations.impl.SoftMinMaxActivationsPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Sparse_layers.Sparse_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Sparse_layers.impl.Sparse_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Tensor.TensorPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Tensor.impl.TensorPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Transformer_layers.Transformer_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Transformer_layers.impl.Transformer_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Vision_layers.Vision_layersPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Vision_layers.impl.Vision_layersPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.datatypes.DatatypesPackage; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.datatypes.impl.DatatypesPackageImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.impl.AIMLPackageImpl; |
| |
| import org.eclipse.uml2.types.TypesPackage; |
| |
| import org.eclipse.uml2.uml.UMLPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Package</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class Normalization_layersPackageImpl extends EPackageImpl implements Normalization_layersPackage { |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass normalization_layersEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass normalization_layers_1EClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass layerNormEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass localResponseNormEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass normalization_layers_1_1EClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass normalization_layers_1_1_1EClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass groupNormEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass batchNorm1dEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass batchNorm2dEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass batchNorm3dEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass syncBatchNormEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass instanceNorm1dEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass instanceNorm2dEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass instanceNorm3dEClass = null; |
| |
| /** |
| * Creates an instance of the model <b>Package</b>, registered with |
| * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
| * package URI value. |
| * <p>Note: the correct way to create the package is via the static |
| * factory method {@link #init init()}, which also performs |
| * initialization of the package, or returns the registered package, |
| * if one already exists. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see org.eclipse.emf.ecore.EPackage.Registry |
| * @see org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.Normalization_layersPackage#eNS_URI |
| * @see #init() |
| * @generated |
| */ |
| private Normalization_layersPackageImpl() { |
| super(eNS_URI, Normalization_layersFactory.eINSTANCE); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static boolean isInited = false; |
| |
| /** |
| * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. |
| * |
| * <p>This method is used to initialize {@link Normalization_layersPackage#eINSTANCE} when that field is accessed. |
| * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #eNS_URI |
| * @see #createPackageContents() |
| * @see #initializePackageContents() |
| * @generated |
| */ |
| public static Normalization_layersPackage init() { |
| if (isInited) return (Normalization_layersPackage)EPackage.Registry.INSTANCE.getEPackage(Normalization_layersPackage.eNS_URI); |
| |
| // Obtain or create and register package |
| Object registeredNormalization_layersPackage = EPackage.Registry.INSTANCE.get(eNS_URI); |
| Normalization_layersPackageImpl theNormalization_layersPackage = registeredNormalization_layersPackage instanceof Normalization_layersPackageImpl ? (Normalization_layersPackageImpl)registeredNormalization_layersPackage : new Normalization_layersPackageImpl(); |
| |
| isInited = true; |
| |
| // Initialize simple dependencies |
| EcorePackage.eINSTANCE.eClass(); |
| TypesPackage.eINSTANCE.eClass(); |
| UMLPackage.eINSTANCE.eClass(); |
| |
| // Obtain or create and register interdependencies |
| Object registeredPackage = EPackage.Registry.INSTANCE.getEPackage(AIMLPackage.eNS_URI); |
| AIMLPackageImpl theAIMLPackage = (AIMLPackageImpl)(registeredPackage instanceof AIMLPackageImpl ? registeredPackage : AIMLPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(ModulePackage.eNS_URI); |
| ModulePackageImpl theModulePackage = (ModulePackageImpl)(registeredPackage instanceof ModulePackageImpl ? registeredPackage : ModulePackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(TensorPackage.eNS_URI); |
| TensorPackageImpl theTensorPackage = (TensorPackageImpl)(registeredPackage instanceof TensorPackageImpl ? registeredPackage : TensorPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(DatatypesPackage.eNS_URI); |
| DatatypesPackageImpl theDatatypesPackage = (DatatypesPackageImpl)(registeredPackage instanceof DatatypesPackageImpl ? registeredPackage : DatatypesPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Pooling_layersPackage.eNS_URI); |
| Pooling_layersPackageImpl thePooling_layersPackage = (Pooling_layersPackageImpl)(registeredPackage instanceof Pooling_layersPackageImpl ? registeredPackage : Pooling_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Convolution_layersPackage.eNS_URI); |
| Convolution_layersPackageImpl theConvolution_layersPackage = (Convolution_layersPackageImpl)(registeredPackage instanceof Convolution_layersPackageImpl ? registeredPackage : Convolution_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Layer_weight_constraintsPackage.eNS_URI); |
| Layer_weight_constraintsPackageImpl theLayer_weight_constraintsPackage = (Layer_weight_constraintsPackageImpl)(registeredPackage instanceof Layer_weight_constraintsPackageImpl ? registeredPackage : Layer_weight_constraintsPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Padding_layersPackage.eNS_URI); |
| Padding_layersPackageImpl thePadding_layersPackage = (Padding_layersPackageImpl)(registeredPackage instanceof Padding_layersPackageImpl ? registeredPackage : Padding_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(NonLinearActivationsPackage.eNS_URI); |
| NonLinearActivationsPackageImpl theNonLinearActivationsPackage = (NonLinearActivationsPackageImpl)(registeredPackage instanceof NonLinearActivationsPackageImpl ? registeredPackage : NonLinearActivationsPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(SoftMinMaxActivationsPackage.eNS_URI); |
| SoftMinMaxActivationsPackageImpl theSoftMinMaxActivationsPackage = (SoftMinMaxActivationsPackageImpl)(registeredPackage instanceof SoftMinMaxActivationsPackageImpl ? registeredPackage : SoftMinMaxActivationsPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Recurrent_layersPackage.eNS_URI); |
| Recurrent_layersPackageImpl theRecurrent_layersPackage = (Recurrent_layersPackageImpl)(registeredPackage instanceof Recurrent_layersPackageImpl ? registeredPackage : Recurrent_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Transformer_layersPackage.eNS_URI); |
| Transformer_layersPackageImpl theTransformer_layersPackage = (Transformer_layersPackageImpl)(registeredPackage instanceof Transformer_layersPackageImpl ? registeredPackage : Transformer_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Linear_layersPackage.eNS_URI); |
| Linear_layersPackageImpl theLinear_layersPackage = (Linear_layersPackageImpl)(registeredPackage instanceof Linear_layersPackageImpl ? registeredPackage : Linear_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Dropout_layersPackage.eNS_URI); |
| Dropout_layersPackageImpl theDropout_layersPackage = (Dropout_layersPackageImpl)(registeredPackage instanceof Dropout_layersPackageImpl ? registeredPackage : Dropout_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Sparse_layersPackage.eNS_URI); |
| Sparse_layersPackageImpl theSparse_layersPackage = (Sparse_layersPackageImpl)(registeredPackage instanceof Sparse_layersPackageImpl ? registeredPackage : Sparse_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Distance_functionsPackage.eNS_URI); |
| Distance_functionsPackageImpl theDistance_functionsPackage = (Distance_functionsPackageImpl)(registeredPackage instanceof Distance_functionsPackageImpl ? registeredPackage : Distance_functionsPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Loss_functionsPackage.eNS_URI); |
| Loss_functionsPackageImpl theLoss_functionsPackage = (Loss_functionsPackageImpl)(registeredPackage instanceof Loss_functionsPackageImpl ? registeredPackage : Loss_functionsPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Vision_layersPackage.eNS_URI); |
| Vision_layersPackageImpl theVision_layersPackage = (Vision_layersPackageImpl)(registeredPackage instanceof Vision_layersPackageImpl ? registeredPackage : Vision_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(DataParallel_layersPackage.eNS_URI); |
| DataParallel_layersPackageImpl theDataParallel_layersPackage = (DataParallel_layersPackageImpl)(registeredPackage instanceof DataParallel_layersPackageImpl ? registeredPackage : DataParallel_layersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Layer_weight_regularizersPackage.eNS_URI); |
| Layer_weight_regularizersPackageImpl theLayer_weight_regularizersPackage = (Layer_weight_regularizersPackageImpl)(registeredPackage instanceof Layer_weight_regularizersPackageImpl ? registeredPackage : Layer_weight_regularizersPackage.eINSTANCE); |
| registeredPackage = EPackage.Registry.INSTANCE.getEPackage(Layer_weight_initializersPackage.eNS_URI); |
| Layer_weight_initializersPackageImpl theLayer_weight_initializersPackage = (Layer_weight_initializersPackageImpl)(registeredPackage instanceof Layer_weight_initializersPackageImpl ? registeredPackage : Layer_weight_initializersPackage.eINSTANCE); |
| |
| // Create package meta-data objects |
| theNormalization_layersPackage.createPackageContents(); |
| theAIMLPackage.createPackageContents(); |
| theModulePackage.createPackageContents(); |
| theTensorPackage.createPackageContents(); |
| theDatatypesPackage.createPackageContents(); |
| thePooling_layersPackage.createPackageContents(); |
| theConvolution_layersPackage.createPackageContents(); |
| theLayer_weight_constraintsPackage.createPackageContents(); |
| thePadding_layersPackage.createPackageContents(); |
| theNonLinearActivationsPackage.createPackageContents(); |
| theSoftMinMaxActivationsPackage.createPackageContents(); |
| theRecurrent_layersPackage.createPackageContents(); |
| theTransformer_layersPackage.createPackageContents(); |
| theLinear_layersPackage.createPackageContents(); |
| theDropout_layersPackage.createPackageContents(); |
| theSparse_layersPackage.createPackageContents(); |
| theDistance_functionsPackage.createPackageContents(); |
| theLoss_functionsPackage.createPackageContents(); |
| theVision_layersPackage.createPackageContents(); |
| theDataParallel_layersPackage.createPackageContents(); |
| theLayer_weight_regularizersPackage.createPackageContents(); |
| theLayer_weight_initializersPackage.createPackageContents(); |
| |
| // Initialize created meta-data |
| theNormalization_layersPackage.initializePackageContents(); |
| theAIMLPackage.initializePackageContents(); |
| theModulePackage.initializePackageContents(); |
| theTensorPackage.initializePackageContents(); |
| theDatatypesPackage.initializePackageContents(); |
| thePooling_layersPackage.initializePackageContents(); |
| theConvolution_layersPackage.initializePackageContents(); |
| theLayer_weight_constraintsPackage.initializePackageContents(); |
| thePadding_layersPackage.initializePackageContents(); |
| theNonLinearActivationsPackage.initializePackageContents(); |
| theSoftMinMaxActivationsPackage.initializePackageContents(); |
| theRecurrent_layersPackage.initializePackageContents(); |
| theTransformer_layersPackage.initializePackageContents(); |
| theLinear_layersPackage.initializePackageContents(); |
| theDropout_layersPackage.initializePackageContents(); |
| theSparse_layersPackage.initializePackageContents(); |
| theDistance_functionsPackage.initializePackageContents(); |
| theLoss_functionsPackage.initializePackageContents(); |
| theVision_layersPackage.initializePackageContents(); |
| theDataParallel_layersPackage.initializePackageContents(); |
| theLayer_weight_regularizersPackage.initializePackageContents(); |
| theLayer_weight_initializersPackage.initializePackageContents(); |
| |
| // Mark meta-data to indicate it can't be changed |
| theNormalization_layersPackage.freeze(); |
| |
| // Update the registry and return the package |
| EPackage.Registry.INSTANCE.put(Normalization_layersPackage.eNS_URI, theNormalization_layersPackage); |
| return theNormalization_layersPackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getNormalization_layers() { |
| return normalization_layersEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getNormalization_layers_1() { |
| return normalization_layers_1EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getNormalization_layers_1_Eps() { |
| return (EAttribute)normalization_layers_1EClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getLayerNorm() { |
| return layerNormEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getLayerNorm_Normalized_shape() { |
| return (EAttribute)layerNormEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getLayerNorm_Elementwise_affine() { |
| return (EAttribute)layerNormEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getLocalResponseNorm() { |
| return localResponseNormEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getLocalResponseNorm_Size() { |
| return (EAttribute)localResponseNormEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getLocalResponseNorm_Alpha() { |
| return (EAttribute)localResponseNormEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getLocalResponseNorm_Beta() { |
| return (EAttribute)localResponseNormEClass.getEStructuralFeatures().get(2); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getLocalResponseNorm_K() { |
| return (EAttribute)localResponseNormEClass.getEStructuralFeatures().get(3); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getNormalization_layers_1_1() { |
| return normalization_layers_1_1EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getNormalization_layers_1_1_Affine() { |
| return (EAttribute)normalization_layers_1_1EClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getNormalization_layers_1_1_1() { |
| return normalization_layers_1_1_1EClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getNormalization_layers_1_1_1_Num_features() { |
| return (EAttribute)normalization_layers_1_1_1EClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getNormalization_layers_1_1_1_Momentum() { |
| return (EAttribute)normalization_layers_1_1_1EClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getNormalization_layers_1_1_1_Track_running_stats() { |
| return (EAttribute)normalization_layers_1_1_1EClass.getEStructuralFeatures().get(2); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getGroupNorm() { |
| return groupNormEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getGroupNorm_Num_groups() { |
| return (EAttribute)groupNormEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getGroupNorm_Num_channels() { |
| return (EAttribute)groupNormEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getBatchNorm1d() { |
| return batchNorm1dEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getBatchNorm2d() { |
| return batchNorm2dEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getBatchNorm3d() { |
| return batchNorm3dEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getSyncBatchNorm() { |
| return syncBatchNormEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EAttribute getSyncBatchNorm_Process_group() { |
| return (EAttribute)syncBatchNormEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getInstanceNorm1d() { |
| return instanceNorm1dEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getInstanceNorm2d() { |
| return instanceNorm2dEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EClass getInstanceNorm3d() { |
| return instanceNorm3dEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Normalization_layersFactory getNormalization_layersFactory() { |
| return (Normalization_layersFactory)getEFactoryInstance(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private boolean isCreated = false; |
| |
| /** |
| * Creates the meta-model objects for the package. This method is |
| * guarded to have no affect on any invocation but its first. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void createPackageContents() { |
| if (isCreated) return; |
| isCreated = true; |
| |
| // Create classes and their features |
| normalization_layersEClass = createEClass(NORMALIZATION_LAYERS); |
| |
| normalization_layers_1EClass = createEClass(NORMALIZATION_LAYERS_1); |
| createEAttribute(normalization_layers_1EClass, NORMALIZATION_LAYERS_1__EPS); |
| |
| layerNormEClass = createEClass(LAYER_NORM); |
| createEAttribute(layerNormEClass, LAYER_NORM__NORMALIZED_SHAPE); |
| createEAttribute(layerNormEClass, LAYER_NORM__ELEMENTWISE_AFFINE); |
| |
| localResponseNormEClass = createEClass(LOCAL_RESPONSE_NORM); |
| createEAttribute(localResponseNormEClass, LOCAL_RESPONSE_NORM__SIZE); |
| createEAttribute(localResponseNormEClass, LOCAL_RESPONSE_NORM__ALPHA); |
| createEAttribute(localResponseNormEClass, LOCAL_RESPONSE_NORM__BETA); |
| createEAttribute(localResponseNormEClass, LOCAL_RESPONSE_NORM__K); |
| |
| normalization_layers_1_1EClass = createEClass(NORMALIZATION_LAYERS_11); |
| createEAttribute(normalization_layers_1_1EClass, NORMALIZATION_LAYERS_11__AFFINE); |
| |
| normalization_layers_1_1_1EClass = createEClass(NORMALIZATION_LAYERS_111); |
| createEAttribute(normalization_layers_1_1_1EClass, NORMALIZATION_LAYERS_111__NUM_FEATURES); |
| createEAttribute(normalization_layers_1_1_1EClass, NORMALIZATION_LAYERS_111__MOMENTUM); |
| createEAttribute(normalization_layers_1_1_1EClass, NORMALIZATION_LAYERS_111__TRACK_RUNNING_STATS); |
| |
| groupNormEClass = createEClass(GROUP_NORM); |
| createEAttribute(groupNormEClass, GROUP_NORM__NUM_GROUPS); |
| createEAttribute(groupNormEClass, GROUP_NORM__NUM_CHANNELS); |
| |
| batchNorm1dEClass = createEClass(BATCH_NORM1D); |
| |
| batchNorm2dEClass = createEClass(BATCH_NORM2D); |
| |
| batchNorm3dEClass = createEClass(BATCH_NORM3D); |
| |
| syncBatchNormEClass = createEClass(SYNC_BATCH_NORM); |
| createEAttribute(syncBatchNormEClass, SYNC_BATCH_NORM__PROCESS_GROUP); |
| |
| instanceNorm1dEClass = createEClass(INSTANCE_NORM1D); |
| |
| instanceNorm2dEClass = createEClass(INSTANCE_NORM2D); |
| |
| instanceNorm3dEClass = createEClass(INSTANCE_NORM3D); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private boolean isInitialized = false; |
| |
| /** |
| * Complete the initialization of the package and its meta-model. This |
| * method is guarded to have no affect on any invocation but its first. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void initializePackageContents() { |
| if (isInitialized) return; |
| isInitialized = true; |
| |
| // Initialize package |
| setName(eNAME); |
| setNsPrefix(eNS_PREFIX); |
| setNsURI(eNS_URI); |
| |
| // Obtain other dependent packages |
| ModulePackage theModulePackage = (ModulePackage)EPackage.Registry.INSTANCE.getEPackage(ModulePackage.eNS_URI); |
| TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI); |
| |
| // Create type parameters |
| |
| // Set bounds for type parameters |
| |
| // Add supertypes to classes |
| normalization_layersEClass.getESuperTypes().add(theModulePackage.getModel()); |
| normalization_layers_1EClass.getESuperTypes().add(this.getNormalization_layers()); |
| layerNormEClass.getESuperTypes().add(this.getNormalization_layers_1()); |
| localResponseNormEClass.getESuperTypes().add(this.getNormalization_layers()); |
| normalization_layers_1_1EClass.getESuperTypes().add(this.getNormalization_layers_1()); |
| normalization_layers_1_1_1EClass.getESuperTypes().add(this.getNormalization_layers_1_1()); |
| groupNormEClass.getESuperTypes().add(this.getNormalization_layers_1_1()); |
| batchNorm1dEClass.getESuperTypes().add(this.getNormalization_layers_1_1_1()); |
| batchNorm2dEClass.getESuperTypes().add(this.getNormalization_layers_1_1_1()); |
| batchNorm3dEClass.getESuperTypes().add(this.getNormalization_layers_1_1_1()); |
| syncBatchNormEClass.getESuperTypes().add(this.getNormalization_layers_1_1_1()); |
| instanceNorm1dEClass.getESuperTypes().add(this.getNormalization_layers_1_1_1()); |
| instanceNorm2dEClass.getESuperTypes().add(this.getNormalization_layers_1_1_1()); |
| instanceNorm3dEClass.getESuperTypes().add(this.getNormalization_layers_1_1_1()); |
| |
| // Initialize classes, features, and operations; add parameters |
| initEClass(normalization_layersEClass, Normalization_layers.class, "Normalization_layers", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| |
| initEClass(normalization_layers_1EClass, Normalization_layers_1.class, "Normalization_layers_1", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| initEAttribute(getNormalization_layers_1_Eps(), theTypesPackage.getReal(), "eps", null, 0, 1, Normalization_layers_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| |
| initEClass(layerNormEClass, LayerNorm.class, "LayerNorm", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| initEAttribute(getLayerNorm_Normalized_shape(), theTypesPackage.getInteger(), "normalized_shape", null, 0, -1, LayerNorm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| initEAttribute(getLayerNorm_Elementwise_affine(), theTypesPackage.getBoolean(), "elementwise_affine", null, 0, 1, LayerNorm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| |
| initEClass(localResponseNormEClass, LocalResponseNorm.class, "LocalResponseNorm", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| initEAttribute(getLocalResponseNorm_Size(), theTypesPackage.getInteger(), "size", null, 1, 1, LocalResponseNorm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| initEAttribute(getLocalResponseNorm_Alpha(), theTypesPackage.getReal(), "alpha", null, 0, 1, LocalResponseNorm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| initEAttribute(getLocalResponseNorm_Beta(), theTypesPackage.getReal(), "beta", null, 0, 1, LocalResponseNorm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| initEAttribute(getLocalResponseNorm_K(), theTypesPackage.getReal(), "k", null, 0, 1, LocalResponseNorm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| |
| initEClass(normalization_layers_1_1EClass, Normalization_layers_1_1.class, "Normalization_layers_1_1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| initEAttribute(getNormalization_layers_1_1_Affine(), theTypesPackage.getBoolean(), "affine", null, 0, 1, Normalization_layers_1_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| |
| initEClass(normalization_layers_1_1_1EClass, Normalization_layers_1_1_1.class, "Normalization_layers_1_1_1", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| initEAttribute(getNormalization_layers_1_1_1_Num_features(), theTypesPackage.getInteger(), "num_features", null, 1, 1, Normalization_layers_1_1_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| initEAttribute(getNormalization_layers_1_1_1_Momentum(), theTypesPackage.getReal(), "momentum", null, 0, 1, Normalization_layers_1_1_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| initEAttribute(getNormalization_layers_1_1_1_Track_running_stats(), theTypesPackage.getBoolean(), "track_running_stats", null, 0, 1, Normalization_layers_1_1_1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| |
| initEClass(groupNormEClass, GroupNorm.class, "GroupNorm", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| initEAttribute(getGroupNorm_Num_groups(), theTypesPackage.getInteger(), "num_groups", null, 1, 1, GroupNorm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| initEAttribute(getGroupNorm_Num_channels(), theTypesPackage.getInteger(), "num_channels", null, 1, 1, GroupNorm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| |
| initEClass(batchNorm1dEClass, BatchNorm1d.class, "BatchNorm1d", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| |
| initEClass(batchNorm2dEClass, BatchNorm2d.class, "BatchNorm2d", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| |
| initEClass(batchNorm3dEClass, BatchNorm3d.class, "BatchNorm3d", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| |
| initEClass(syncBatchNormEClass, SyncBatchNorm.class, "SyncBatchNorm", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| initEAttribute(getSyncBatchNorm_Process_group(), theTypesPackage.getInteger(), "process_group", null, 0, 1, SyncBatchNorm.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$ |
| |
| initEClass(instanceNorm1dEClass, InstanceNorm1d.class, "InstanceNorm1d", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| |
| initEClass(instanceNorm2dEClass, InstanceNorm2d.class, "InstanceNorm2d", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| |
| initEClass(instanceNorm3dEClass, InstanceNorm3d.class, "InstanceNorm3d", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ |
| |
| // Create annotations |
| // http://www.eclipse.org/uml2/2.0.0/UML |
| createUMLAnnotations(); |
| } |
| |
| /** |
| * Initializes the annotations for <b>http://www.eclipse.org/uml2/2.0.0/UML</b>. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void createUMLAnnotations() { |
| String source = "http://www.eclipse.org/uml2/2.0.0/UML"; //$NON-NLS-1$ |
| addAnnotation |
| (getNormalization_layers_1_1_1_Track_running_stats(), |
| source, |
| new String[] { |
| "originalName", "track_running_stats " //$NON-NLS-1$ //$NON-NLS-2$ |
| }); |
| addAnnotation |
| (getSyncBatchNorm_Process_group(), |
| source, |
| new String[] { |
| "originalName", "process_group " //$NON-NLS-1$ //$NON-NLS-2$ |
| }); |
| } |
| |
| } //Normalization_layersPackageImpl |