I am trying to clone and run this repository:
https://github.com/switchablenorms/CelebAMask-HQ
The demo runs with PyTorch 0.4.1, and I am trying to find the corresponding version, how can I find it?
The corresponding torchvision version for 0.4.1 is 0.2.1.
The easiest way is to look it up in the previous versions section. Only if you couldn't find it, you can have a look at the torchvision release data and pytorch's version. There you can find which version, got release with which version!
One way to find the torch-to-torchvision correspondence is by looking at
the tables on https://pypi.org/project/torchvision/
or (even better) https://github.com/pytorch/pytorch/wiki/PyTorch-Versions
Based on that, the current version at the time of this writing is 0.2.2.
Related
In the latest release of torchtext they moved a lot of features to torchtext.legacy, I want to do the same things like torchtext.legacy.data.Field and other features without using legacy, is that can be done? and how?
EDIT:
here is a release note about 0.9.0 version
here is the migration guide
Also, in the first link, there are counterparts for legacy Datasets.
Old answer (might be useful)
You could go for an alias, namely:
import torchtext.legacy as torchtext
But this is a bad idea for multiple reasons:
It became legacy for a reason (you can always change your existing code to torchtext.legacy.data.Field)
Very confusing - torchtext should torchtext, not torchtext.legacy
Unable to import torchtext as... torchtext - because this alias is already taken.
You could also do some workarounds like assigning torch.legacy.data.Field to torch.data.Field and what not, but it is a horrible idea.
If you want to work with this legacy stuff, you can always stay with smaller version of torchtext like 0.8.0 and this would make sense
I was looking at torch versions
https://pypi.org/project/torch/#history
1.5.0
1.4.0
1.3.1
1.3.0.post2
1.3.0
1.2.0
1.1.0.post2
1.1.0
1.0.1.post2
1.0.1
1.0.0
0.4.1.post2
0.4.1
0.4.0
0.3.1
0.3.0.post4
0.1.2.post2
0.1.2.post1
And I found out that some versions have the suffix .post2 (or .post3, post4).
At first I thought it was a release made after the minor version X release already happened (postX), but then I saw 1.3.0.post2, so that doesn't seem to make sense.
Also, pytorch doesn't seem to follow semver.
What does postX mean?
It seems like related to PEP-0440 and post releases: https://www.python.org/dev/peps/pep-0440/#post-releases
Post-releases
Some projects use post-releases to address minor errors in a final release that do not affect the distributed software (for example, correcting an error in the release notes).
If used as part of a project's development cycle, these post-releases are indicated by including a post-release segment in the version identifier:
X.Y.postN # Post-release
A version identifier that includes a post-release segment without a developmental release segment is termed a "post-release".
The post-release segment consists of the string .post, followed by a non-negative integer value. Post-releases are ordered by their numerical component, immediately following the corresponding release, and ahead of any subsequent release.
Note
The use of post-releases to publish maintenance releases containing
actual bug fixes is strongly discouraged. In general, it is better to
use a longer release number and increment the final component for each
maintenance release.
But I still don't know how pytorch uses post since it seems to jump some postN versions .
I have trained the model on a super computer(ubuntu). After the training I used the model with Windows 10 and got this error:
SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. you can retrieve the original source code by accessing the object's source attribute or set `torch.nn.Module.dump_patches = True` and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
I can't load the model I trained.
pytorch version in ubuntu: 1.1.0a0+9a7bcac
pytorch version in windows: 0.4.1
What is going wrong and how can I fix it?
EDIT after comment discussion:
It seems like yor Windows version is outdated and there is thus a version conflict occurring. I would strongly suggest to update the version on Windows to post 1.0 release, which should fix the problem.
According to this link, you can likely ignore the warning (not an error), as long as your model seems to still work as intended. The usual culprit for such changes is that you have inconsistent versions of PyTorch on your two systems, and therefore might encounter this warning.
Generally, the versions are supposed to be fully backward compatible, but of course there is no guarantee for this. It has nothing to do with the fact that you are on Linux and/or Windows, unless the source code detects changes in the line break character (which is the main difference from what I remember), although I think this is very unlikely to be the case.
Thank dennlinger very much!
Is the problem of version.
After I update the pytorch version, it work!
The website, http://www.nltk.org, says mid 2011 in a very vague manner. I would like to start using NLTK however I have done a fair amount of work with Python 3.x and I don't want to have to go backwards in Python version just to use it. Just doing an effort analysis, if the wait is long enough I might bite the bullet and revert my Python.
There's a Python 3 branch:
https://github.com/nltk/nltk/tree/nltk-py3k
It's a transformation of the trunk and gets updated every so often to keep up with changes. You can check it out directly from git (instead of using the NLTK installation) and give it a shot.
git clone git://github.com/nltk/nltk.git nltk --branch nltk-py3k
I haven't used it personally, but I assume it works.
There is a "2and3" branch in the main nltk repo - see https://github.com/nltk/nltk/tree/2and3
It appears to be getting updated regularly, although I haven't tried it myself.
Here's the alpha release: https://github.com/nltk/nltk3-alpha
Alternative NLP: TextBlob is fully Python 3. https://github.com/sloria/TextBlob
Tutorial: http://www.stevenloria.com/how-to-build-a-text-classification-system-with-python-and-textblob/
For those who got here wondering when will nltk support python3:
Good news, the NLTK 3.0 series (currently on alpha and in development since Jan 2013) now support Python 2.6, 2.7 and Python 3 (http://www.nltk.org/nltk3-alpha/), We'll probably see a stable release soon :)
And the book is also being updated for python3, available at: http://www.nltk.org/book3/
So, the official release was in September 2014, just to add closure to the question
I've just inherited an application written in Groovy (version 1.3.5) and would like to upgrade it to the newest release (version 1.7.5).
I can't seem to find a reference that enumerates the differences in syntax, etc., which I would need to be aware of ... and yes, I looked at http://groovy.codehaus.org
Does anyone know of a good place that lists version changes?
Many thanks,
~Aki
I think your best bet would be to try it and see where your tests fail.
You do have tests right? ;-)
If not, I'd write some, then try the upgrade and fix where needed.
I don't believe there is a single page where you'd find all the changes from one version to another.
You could maybe collate something by going through all the release notes, but it's probably quicker to just try it.
You can find the changes from one version to another by looking at the release notes. However, the release notes only describe the changes from version N to version N + 1. I don't know how many versions there were between 1.3.5 and 1.7.5, but I'd guess at least 10.
To discover all the changes between 1.3.5 and 1.7.5, you'll have to look at the release notes for each release. Starting from this page, you should be able to find them all, here are some links to get you started.
1.7.5
1.7.4
1.6.9
1.6.8
1.5.8
You should be able to get older releases (and their notes) from the distribution archive.
Having said all that, reading release notes doesn't guarantee anything, (though it's a good way to learn about new features). The only way to be sure that your code runs under the newest version is to compile and test it under that version.