First of all, learn some Python first.
Stop using ctx, use self
Second stuff is that in PyTorch every element of dynamic-graph need to be a Variable or Parameter. So input need also be a Variable (if you don’t get it, watch some tutorials about PyTorch)
My working code is here, but it is still not perfect, initialization of Gaussian is horrible (it should be done in different way)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 10 10:04:34 2018

@author: apple
"""
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.autograd import Function

class Gaussian(nn.Module):
    def __init__(self,in_features,out_features):
        super(Gaussian,self).__init__()
        self.sigma=nn.Parameter(torch.Tensor(out_features))
        self.center=nn.Parameter(torch.Tensor(out_features,in_features))
        
    def forward(self, input):
        dist=self.center-input  
        dist=torch.pow(dist,2)
        dist=torch.sum(dist,1)
        sigma=torch.pow(self.sigma,2)
        dist=-1/2*sigma*dist
        output=torch.exp(dist)
        return output

class RBF(nn.Module):
    def __init__(self,in_features,out_features):
        super(RBF,self).__init__()
        self.Gaussian1 = Gaussian(in_features,out_features)
    
    def forward(self,x):
        return self.Gaussian1(x)


def Gaussian_init(m):
    if isinstance(m, Gaussian):
        m.sigma=nn.Parameter(torch.Tensor([3]))
        m.center=nn.Parameter(torch.Tensor([[1,2]]))

model=RBF(2,1)
model.apply(Gaussian_init)

x=Variable(torch.Tensor([1,2]))
y=model(x)
print(y)