aks2203 / easy-to-hard Goto Github PK
View Code? Open in Web Editor NEWOfficial repository for the paper "Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networks"
License: MIT License
Official repository for the paper "Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networks"
License: MIT License
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.