Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

opt.inputDims is a required argument but is not enforced #14

Open
vzhong opened this issue Feb 9, 2016 · 1 comment
Open

opt.inputDims is a required argument but is not enforced #14

vzhong opened this issue Feb 9, 2016 · 1 comment

Comments

@vzhong
Copy link

vzhong commented Feb 9, 2016

In this line
https://github.com/twitter/torch-dataset/blob/master/lua/Batch.lua#L19

applyInputDims is called with opt.inputDims which by default is not set. However applyInputDims expects this argument and crashes (eg. assert fails) if this is not set.

I think there should be either

  1. Documentation specifying what opt.inputDims is
  2. Some automatic way of setting a default opt.InputDims.

Otherwise the README example under Multiple Indices fail when sampledBatcher is called:

   local getBatch, numBatches = dataset.sampledBatcher({
      batchSize = 1,
      samplerKind = { 'part-linear', 'part-linear-permutation' },   -- sample the first linearily, the second with a permutation
      processor = processor,
   })
@zakattacktwitter
Copy link
Contributor

Sorry about that. Can you try the examples, they should all run without
problems.

I don’t think you can default the inputDims, but we can definitely throw a
better error when it is not provided.

On Tue, Feb 9, 2016 at 3:27 PM, Victor Zhong notifications@github.com
wrote:

In this line
https://github.com/twitter/torch-dataset/blob/master/lua/Batch.lua#L19

applyInputDims is called with opt.inputDims which by default is not set.
However applyInputDims expects this argument and crashes (eg. assert
fails) if this is not set.

I think there should be either

  1. Documentation specifying what opt.inputDims is
  2. Some automatic way of setting a default opt.InputDims.

Otherwise the README example under Multiple Indices fail when
sampledBatcher is called:

local getBatch, numBatches = dataset.sampledBatcher({
batchSize = 1,
samplerKind = { 'part-linear', 'part-linear-permutation' }, -- sample the first linearily, the second with a permutation
processor = processor,
})


Reply to this email directly or view it on GitHub
#14.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants