| /** |
| * 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.Layer_weight_initializers.impl; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.emf.ecore.EPackage; |
| |
| import org.eclipse.emf.ecore.impl.EFactoryImpl; |
| |
| import org.eclipse.emf.ecore.plugin.EcorePlugin; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Layer_weight_initializers.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class Layer_weight_initializersFactoryImpl extends EFactoryImpl implements Layer_weight_initializersFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static Layer_weight_initializersFactory init() { |
| try { |
| Layer_weight_initializersFactory theLayer_weight_initializersFactory = (Layer_weight_initializersFactory)EPackage.Registry.INSTANCE.getEFactory(Layer_weight_initializersPackage.eNS_URI); |
| if (theLayer_weight_initializersFactory != null) { |
| return theLayer_weight_initializersFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new Layer_weight_initializersFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Layer_weight_initializersFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case Layer_weight_initializersPackage.RANDOM_NORMAL: return createrandom_normal(); |
| case Layer_weight_initializersPackage.RANDOM_UNIFORM: return createrandom_uniform(); |
| case Layer_weight_initializersPackage.TRUNCATED_NORMAL: return createtruncated_normal(); |
| case Layer_weight_initializersPackage.ZEROS: return createzeros(); |
| case Layer_weight_initializersPackage.ONES: return createones(); |
| case Layer_weight_initializersPackage.GLOROT_NORMAL: return createglorot_normal(); |
| case Layer_weight_initializersPackage.GLOROT_UNIFORM: return createglorot_uniform(); |
| case Layer_weight_initializersPackage.IDENTITY: return createidentity(); |
| case Layer_weight_initializersPackage.ORTHOGONAL: return createorthogonal(); |
| case Layer_weight_initializersPackage.CONSTANT: return createconstant(); |
| case Layer_weight_initializersPackage.VARIANCE_SCALING: return createvariance_scaling(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public random_normal createrandom_normal() { |
| random_normalImpl random_normal = new random_normalImpl(); |
| return random_normal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public random_uniform createrandom_uniform() { |
| random_uniformImpl random_uniform = new random_uniformImpl(); |
| return random_uniform; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public truncated_normal createtruncated_normal() { |
| truncated_normalImpl truncated_normal = new truncated_normalImpl(); |
| return truncated_normal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public zeros createzeros() { |
| zerosImpl zeros = new zerosImpl(); |
| return zeros; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public ones createones() { |
| onesImpl ones = new onesImpl(); |
| return ones; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public glorot_normal createglorot_normal() { |
| glorot_normalImpl glorot_normal = new glorot_normalImpl(); |
| return glorot_normal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public glorot_uniform createglorot_uniform() { |
| glorot_uniformImpl glorot_uniform = new glorot_uniformImpl(); |
| return glorot_uniform; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public identity createidentity() { |
| identityImpl identity = new identityImpl(); |
| return identity; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public orthogonal createorthogonal() { |
| orthogonalImpl orthogonal = new orthogonalImpl(); |
| return orthogonal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public constant createconstant() { |
| constantImpl constant = new constantImpl(); |
| return constant; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public variance_scaling createvariance_scaling() { |
| variance_scalingImpl variance_scaling = new variance_scalingImpl(); |
| return variance_scaling; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Layer_weight_initializersPackage getLayer_weight_initializersPackage() { |
| return (Layer_weight_initializersPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static Layer_weight_initializersPackage getPackage() { |
| return Layer_weight_initializersPackage.eINSTANCE; |
| } |
| |
| } //Layer_weight_initializersFactoryImpl |