Questions tagged [chainer]

Chainer is an open source deep learning framework written in Python.

Chainer

A Powerful, Flexible, and Intuitive Framework for Neural Networks

For more info see chainer.org

194 questions
1
vote
2 answers

TypeError: numpy.ndarray or cuda.ndarray are expected

I want to train Convolution3d model in chainer. In my training roop, I have this error. TypeError: numpy.ndarray or cuda.ndarray are expected. I thought the reason for the error was that the input was a list. So,I changed input array to numpy…
musako
  • 897
  • 2
  • 10
  • 26
1
vote
1 answer

TypeError: Argument 'x' has incorrect type (expected cupy.core.core.ndarray, got numpy.ndarray)

Executing the following minimal example in cupy. import numpy, cupy, cupyx print( cupyx.get_runtime_info() ) mydata = numpy.empty((3,), dtype='f') #gpu = False gpu = True if not gpu: xp = numpy else: xp = cupy mydata_like =…
navneeth
  • 1,239
  • 12
  • 21
1
vote
0 answers

Chainer and float64 support

I want to know how to make chainer support float64 precision calculations. Below is my simple Autoencoder code I wrote in chainer. Initially I was running it with float32 dtype but now I want to test out float64 precision how do I do that ? class…
Kanmani
  • 479
  • 7
  • 21
1
vote
1 answer

Creating a Dataset to input only Images

I need a dataset object that contains only images for unsupervised learning in Chainer framework. I am trying to use DatasetMixin for this purpose. Images is a list containing images. class SimpleDataset(dataset.DatasetMixin): def __init__(self,…
TulakHord
  • 422
  • 7
  • 15
1
vote
1 answer

Calculating number and size of filters for given input size

I have an autoencoder to regenerate input images. The image shape is (10, 1308608). 1308608 is 4*644*508. class AutoEncoder(chainer.Chain): def __init__(self, input_size, n_filters, n_units, filter_size, activation): self.activation =…
TulakHord
  • 422
  • 7
  • 15
1
vote
1 answer

Regression with chainer

How can I do regression with Chainer? Just replacing the usual L.Classifier with a loss function like F.mean_squared_error does not work, e.g. from chainer import iterators, optimizers, training from chainer import Chain from chainer.datasets import…
cheersmate
  • 2,385
  • 4
  • 19
  • 32
1
vote
1 answer

PyTorch and Chainer implementations of the Linear layer- are they equivalent?

I want to use a Linear, Fully-Connected Layer as one of the input layers in my network. The input has shape (batch_size, in_channels, num_samples). It is based on the Tacotron paper: https://arxiv.org/pdf/1703.10135.pdf, the Enocder prenet part. It…
dkwasny
  • 13
  • 2
1
vote
1 answer

cupy.cuda.runtime.CUDARuntimeError: cudaErrorInsufficientDriver

I try to reproduce some codes with chainer. However, there is something wrong with cuda setting. I used the conda environment with python 3.5 and ubuntu16.04. I used chainer 5.4.0 and cupy 5.4.0. When I used "cupy.show_config()", the result…
yangpaopao
  • 11
  • 1
1
vote
1 answer

CuDNN is not available in binary-installed cupy

I installed Cupy using the binary package cupy-cuda92, but CuDNN is not loaded. $ pip install cupy-cuda92==5.4.0 chainer==5.4.0 $ python -c 'import chainer;…
Keisuke
  • 86
  • 4
1
vote
0 answers

Chainer - Python - CUDA_ERROR_INVALID_SOURCE

I have a machine with two different GPUs (one RTX and one Titan V) and often it fails to run tasks. This behaviour is mostly observed in GPU with id=1. The same task can be run successfully in a different machine or GPU with id=0. The precise…
GrigorisG
  • 888
  • 8
  • 13
1
vote
1 answer

Chainer module 'cupy.cudnn' has no attribute 'softmax_forward'

I am trying to run neural network on chainer by GPU. but it seems to be just not working. I tried some version of cuda already, 9.0, 10.1, 10.0. Before I had some problem cupy installation. Now I am just install cupy through Anaconda…
Dale Lin
  • 11
  • 3
1
vote
1 answer

Invalid operation is performed in: LinearFunction (Forward)

this is the main code. The images size is 420*420 import os import chainer from chainer import training from chainer.training import extensions batchsize = 64 epoch = 10 gpu = 0 dataset = "/content/gdrive/My Drive/images/" out =…
evgeni fotia
  • 4,650
  • 3
  • 16
  • 34
1
vote
1 answer

Validation accuracy dropping in CNN Chainer

I am classifying cell images using CNN in Chainer. The validation accuracy of the model is dropping along with the rise of main/training accuracy. I want to know why the validation accuracy is decreasing and what are the ways to increase the…
TulakHord
  • 422
  • 7
  • 15
1
vote
1 answer

How to load multiple matrices into a Chainer model using the iterator interface?

I have a question regarding Chainer's iterator interface, and how it interfaces with a Trainer, Updater and Model. My data are graphs, and hence are of varying matrix shapes. I have concatenated the features matrix into one large dense matrix,…
ericmjl
  • 13,541
  • 12
  • 51
  • 80
1
vote
1 answer

Batchsize in input shape of chainer CNN

I have a training set of 9957 images. The training set has shape (9957, 3, 60, 80). Is batchsize required when putting training set to model? If required can the original shape be considered correct for fitting to conv2D layer or do I need to add…
Athirooban
  • 11
  • 1