Fix compatibility for newer tensorflow and python3 (#6587)
1. In python3, dict.iteritems() is gone, change it to dict.items(). And it also doesn't treat zip object as a list, so change zip to list type. 2. Add encoding flag with open function to make it more compatible for Windows/Linux system. 3. For newer tensorflow, it expected int64 without giving a dtype parameter to embedding layer. We give it float32 to solve it.
Showing
Please register or sign in to comment