classdef TrainerHostStrategy < nnet.internal.cnn.TrainerExecutionStrategy
    % TrainerHostStrategy   Execution stategy for running the Trainer on the
    % host
    
    %   Copyright 2016-2020 The MathWorks, Inc.
    
    methods
        
        function Y = environment(~, X)
            if isgpuarray(X)
                % Error if a gpuArray is provided with CPU ExecutionEnvironment
                exception = MException(message('nnet_cnn:DAGNetwork:InvalidDataForHostEnvironment'));
                throwAsCaller(exception);
            end
            Y = X;
        end
        
    end
    
end
