classdef TrainerGPUStrategy < nnet.internal.cnn.TrainerExecutionStrategy
    % TrainerGPUStrategy   Execution stategy for running the Trainer on the
    % GPU
    
    %   Copyright 2016-2018 The Mathworks, Inc.
    
    methods
        
        function Y = environment(this, X)
            if iscell(X)
                % Data may be packed in cell of cells.
                Y = cell(size(X));
                for i = 1:numel(X)
                    Y{i} = environment(this,X{i});
                end
            else
                Y = gpuArray(X);
            end
        end
        
    end
    
end