Git Product home page Git Product logo

easy-to-hard's People

Contributors

aks2203 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

easy-to-hard's Issues

Sum of input lengths does not equal the length of the input dataset

Hi, Nice work! but when I try to run

cd prefix_sums
./launch/train_models.sh

I got errors:

20210715 18:27:16 train.py main() running.
checkpoint: checkpoints/recur
clip: 1.0
data_path: ../data
debug: False
depth: 44
epochs: 500
eval_data: 30
json_name: test_stats
lr: 0.001
lr_decay: step
lr_factor: 0.5
lr_schedule: [100, 200, 300]
model: recur_net
model_path: None
shuffle: True
optimizer: adam
output: results/train_on_32_bit
save_json: True
save_period: 20
test_batch_size: 500
test_iterations: None
test_mode: default
train_batch_size: 150
train_data: 32
train_log: recur_44_1.txt
train_mode: xent_clipped
train_split: 0.8
val_period: 5
warmup_period: 10
width: 120
logging done in results/train_on_32_bit.
Files already downloaded and verified
Loading data with 32 bits.
Files already downloaded and verified
Loading data with 30 bits.
Traceback (most recent call last):
  File "train.py", line 252, in <module>
    main()
  File "train.py", line 97, in main
    args.eval_data, args.train_split, shuffle=args.shuffle)
  File "/Users/chris/work/easy-to-hard/prefix_sums/utils.py", line 57, in get_dataloaders
    generator=torch.Generator().manual_seed(42))
  File "/anaconda3/envs/easy2hard/lib/python3.7/site-packages/torch/utils/data/dataset.py", line 293, in random_split
    raise ValueError("Sum of input lengths does not equal the length of the input dataset!")

how to resolve this?
Environments:

conda create -n easy2hard python=3.7 
Python 3.7.10

confusion about the definition of recurrent net

sorry for a silly question, but I'm confused, because the definition of RNN I learnt (e.g. from pytorch tutorial https://pytorch.org/tutorials/intermediate/char_rnn_classification_tutorial.html ), every time the forward function return an output and a hidden state(which is passed the next time forward is called), or hidden structure is stored
but in recurrent_net.py i dont see such a structure(hidden state passed to forward func), what am I missing here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.