Are you sure you are passing the image as (1, 28, 28). It accepts input as (N, C, H, W). It runs on my computer perfectly.
import torch
import torch.nn as nn
from torch.autograd import Variable
import numpy as np

class channel1(nn.Module):
	def __init__(self):
		super(channel1, self).__init__()
		self.conv1 = nn.Conv2d(1, 96, kernel_size=3, stride=1, padding=1)
		self.relu1 = nn.ReLU(inplace=True)
		self.conv2 = nn.Conv2d(96, 10, kernel_size=3, stride=1, padding=1)

	def forward(self, x):
		x = self.conv1(x)
		x = self.relu1(x)
		x = self.conv2(x)
		return x

if __name__ == '__main__':
	someNet = channel1()
	x = Variable(torch.randn(1, 1, 28, 28))
	print someNet(x)