A Novel Cosine Network For Pricing European And Barrier Options Under Stochastic Volatility Models