Posts

Showing posts with the label deep-learning

Why doesn't want my simple pytorch network move on Cuda?

Image
Clash Royale CLAN TAG #URR8PPP Why doesn't want my simple pytorch network move on Cuda? I built a simple network from a tutorial and I got this error: RuntimeError: Expected object of type torch.cuda.FloatTensor but found type torch.FloatTensor for argument #4 'mat1' Any help? Thank you! import torch import torchvision device = torch.device("cuda:0") root = '.data/' dataset = torchvision.datasets.MNIST(root, transform=torchvision.transforms.ToTensor(), download=True) dataloader = torch.utils.data.DataLoader(dataset, batch_size=4) class Net(torch.nn.Module): def __init__(self): super(Net, self).__init__() self.out = torch.nn.Linear(28*28, 10) def forward(self, x): x = x.view(x.size(0), -1) x = self.out(x) return x net = Net() net.to(device) for i, (inputs, labels) in enumerate(dataloader): inputs.to(device) out = net(inputs) 1 Answer 1 ...

What is the puspose of dimension reduction in classification?

Image
Clash Royale CLAN TAG #URR8PPP What is the puspose of dimension reduction in classification? We use Principal Component Analysis for dimension reduction, why is it important? To deal with Curse of Dimensionality . – Akshay Nevrekar 3 mins ago Curse of Dimensionality By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

input shape of dataset in cnn

Image
Clash Royale CLAN TAG #URR8PPP input shape of dataset in cnn My dataset is a simple table of 20 columns and 100,000 rows.It is not a image data as commonly used in CNN. What input shape should I provide in this case? Right now I did- input_shape = (21,109713,1) model.add(Conv2D(32, kernel_size=(5, 5), strides=(1, 1), activation='relu', input_shape=input_shape)) which gives the error- ValueError: rng_mrg cpu-implementation does not support more than (2**31 -1) samples Try giving the shape as (109713,21,1) – Hari Krishnan 3 mins ago By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these p...