L1aoXingyu / Char-RNN-PyTorch

使用PyTorch实现Char RNN生成古诗和周杰伦的歌词
139 stars 41 forks source link

Can not find mxtorch #2

Closed mengli94 closed 6 years ago

L1aoXingyu commented 6 years ago

I am so sorry. Recently I am changing this model, so it may cause some mistakes. I have already restored this repo.

mengli94 commented 6 years ago

Hi, I find the mxtorch. But now, it says: Fire trace:

  1. Initial component
  2. ('Cannot find target in dict:', '--state', {'torch': <module 'torch' from '/Users/limeng/anaconda/lib/python2.7/site-packages/torch/init.pyc'>, 'meter': <module 'mxtorch.meter' from '/Users/limeng/Documents/cmu/project/example/Char-RNN-PyTorch/mxtorch/meter/init.pyc'>, 'pick_top_n': <function pick_top_n at 0x108672488>, 'nn': <module 'torch.nn' from '/Users/limeng/anaconda/lib/python2.7/site-packages/torch/nn/init.pyc'>, 'TextConverter': <class 'data.dataset.TextConverter'>, 'get_data': <function get_data at 0x1081bded8>, 'package': None, 'builtins': <module 'builtin' (built-in)>, 'models': <module 'models' from '/Users/limeng/Documents/cmu/project/example/Char-RNN-PyTorch/models/init.pyc'>, 'np': <module 'numpy' from '/Users/limeng/anaconda/lib/python2.7/site-packages/numpy/init.pyc'>, 'doc': '\n@author: xyliao\n@contact: xyliao1993@qq.com\n', 'opt': <config.DefaultConfig object at 0x108670290>, 'CharRNNTrainer': <class 'main.CharRNNTrainer'>, 'fire': <module 'fire' from '/Users/limeng/anaconda/lib/python2.7/site-packages/fire/init.pyc'>, 'file': 'main.py', 'TextDataset': <class 'data.dataset.TextDataset'>, 'get_optimizer': <function get_optimizer at 0x108672cf8>, 'Variable': <class 'torch.autograd.variable.Variable'>, 'train': <function train at 0x108672e60>, 'name': 'main', 'Trainer': <class 'mxtorch.trainer.Trainer'>, 'convert': <data.dataset.TextConverter object at 0x108670550>, 'get_criterion': <function get_criterion at 0x108672aa0>, 'DataLoader': <class 'torch.utils.data.dataloader.DataLoader'>, 'get_model': <function get_model at 0x108672d70>})
L1aoXingyu commented 6 years ago

just forget this, I am changing the architecture of the model, you can download this repo again and run this code by the instruction. Btw, if you want to try new experiment code, you can run by python main.py train

mengli94 commented 6 years ago

Hi, when I run the new code. It saids: No such file or directory: './poetry_checkpoints/model_300.pth' How do I get the checkpoint dir?

L1aoXingyu commented 6 years ago

You can try it again, I have already finished all code. You need to train first to get model_300.pth or others.