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
2
votes
1 answer

Modifying size of input images for Chainer DCGAN model

I'm using the Chainer DCGAN example file found at https://github.com/chainer/chainer/blob/master/examples/dcgan/train_dcgan.py . It works fine for 32x32 images, but for other resolutions, the README.md instructs to modify the network architecture in…
2
votes
1 answer

equivalent of tf.dense in chainer

As the documentation of tf.dense states for this layer the output tensor is the same shape as inputs except the last dimension is of size units. I was trying to have similar behavior in Chainer but I was not successful. In Tensorflow one can have a…
D3GAN
  • 642
  • 10
  • 26
2
votes
3 answers

Difference in the array type using numpy and cupy

I am using chainer library for my model and facing the below issue: Say I have a file of test data having 3 features and a label (last column) with them. It is imported in the form of a list. e.g. test_set =…
Gurpreet.S
  • 125
  • 2
  • 8
2
votes
1 answer

CuPy running out of memory

I have been testing the CuPy library and done a simple matrix multiplication using einsum: C = cp.einsum('pqrs,rs->pq', A, B) Dimensions of A and B are, (41, 41, 41, 41) (41, 41), receptively. I also checked their sizes, which are 22606088 bytes,…
EveSz
  • 61
  • 6
2
votes
1 answer

Forward pass output of a pertained network changes without back propagation

I am using Chainer's pertained model vgg (here named net). Every time I run the following code, I get a different result: img = Image.open("/Users/macintosh/Desktop/Code/Ger.jpg") img = Variable(vgg.prepare(img)) img = img.reshape((1,) +…
2
votes
2 answers

Solve rectangular sparse linear equation systems with cupy

I'm trying to solve a rectangular system for sparse features using cupy. I know the built-in function sparse.linalg.lsqr(A, b) do it for square matrix A. However I like to solve a rectangular sparse system. This is the way we can solve a squared…
Nacho
  • 792
  • 1
  • 5
  • 23
2
votes
2 answers

I got a warning "A batch with no more than one sample ---" when try to predict a single image using Resnet50 with Chainer

I got a warning "A batch with no more than one sample has been given to F.batch_normalization. F.batch_normalization will always output a zero tensor for such batches" when trying to predict a single a image. I am using Resnet50 model (binary…
2
votes
1 answer

extensions or even observation empty with Chainer

I am kind of new on Chainer and I have been struggling with a weird situation recently. I have a Chain to compute a CNN which I feed with a labeledDataSet. But no results appears when I use the extensions. When I display the observation value it is…
Betty LD
  • 63
  • 5
2
votes
3 answers

Can not import cupy with chainer 4.1.0

I have a project in python2.7.11 using chainer and cupy. After updating version of Chainer from 1.22 to 4.1.0, I can not using cupy >>> import cupy Traceback (most recent call last): File "", line 1, in ImportError: No module…
2
votes
1 answer

Why need we assign the grad of y in Chainer?

I am a novice of Chainer. I am doing by the Guides. However, I find something that I think it is strange. In the Docs » Guides » Variable Chapter, I write the blow code: x = Variable(np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32)) y = 2.0 * x #…
nwpuxhld
  • 85
  • 1
  • 1
  • 10
2
votes
1 answer

How to identify GPU memory bottleneck in chainer

I have a chainer model which sometimes crash due to cupy.cuda.memory.OutOfMemoryError. As the exact emplacement where it happens depends on the size of the elements of the batch, I was wondering if there is a way to identify memory bottlenecks in a…
lforg37
  • 95
  • 8
2
votes
1 answer

Neural Network is unable to predict high values .

I am trying to design a feed forward neural network for predicting regression values . Max value 125 and Min value is -1000 in training set for dependent values . But after training my neural network is predicting max value as 9 and min value as -7…
Navin Kumar
  • 150
  • 2
  • 10
2
votes
1 answer

Will cupy support cython( eg. buffered index)?

I have implement myself defined a chainer Link, but because it is too slow. I have implemented cython CPU version of my code. But I want to further boost speed via GPU. So I test the following code , but it failed: %%cython import numpy as…
machen
  • 283
  • 2
  • 10
2
votes
2 answers

In chainer, how to early stop iteration using chainer.training.Trainer?

I am using chainer framework(Deep learning), suppose I have to stop iteration once two iteration's target function value's gap is little: f - old_f < eps. but chainer.training.Trainer's stop_trigger is (args.epoch, 'epoch') tuple. how to trigger…
machen
  • 283
  • 2
  • 10
2
votes
0 answers

In chainer, how to write BPTT updater using trainer exactly?

chainer document RNN tutorial has incorrect code in this page: https://docs.chainer.org/en/stable/tutorial/recurrentnet.html def update_bptt(updater): loss = 0 for i in range(35): batch = train_iter.__next__() x, t =…
machen
  • 283
  • 2
  • 10
1
2
3
12 13