Wrong version (1.10.2) gets installed for me when I run conda install pytorch -c pytorch-nightly
.
To fix, install the latest pytorch version from the stable channel, then manually download package
for your python version, and install it over the current pytorch. Newest Pytorch Nightly releases here:
Anaconda: Pytorch Nightly Files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn as nn | |
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence | |
seqs = ['gigantic_string','tiny_str','medium_str'] | |
# make <pad> idx 0 | |
vocab = ['<pad>'] + sorted(set(''.join(seqs))) | |
# make model |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.