Comments (5)
I am also getting the same error. I have now converted the entire repository to Python 3.8 using the 2to3.8
command available in Unix systems. However, I continue to get the same error.
from passgan.
same i tried using 2.7 and also 3.11 and 3.10 but same error
from passgan.
this is relatively easy to fix. after some googling I found out that you can load python2 pickles in python3 by specifying the encoding:
line 73-76 in sample.py
with open(os.path.join(args.input_dir, 'charmap.pickle'), 'rb') as f:
charmap = pickle.load(f, encoding="latin1")
with open(os.path.join(args.input_dir, 'inv_charmap.pickle'), 'rb') as f:
inv_charmap = pickle.load(f, encoding="latin1")
I just changed those lines + added brackets to all print statements and that was it. I get a different error, TypeError: Variable is unhashable.
but thats a seperate issue
from passgan.
this is relatively easy to fix. after some googling I found out that you can load python2 pickles in python3 by specifying the encoding:
line 73-76 in sample.py
with open(os.path.join(args.input_dir, 'charmap.pickle'), 'rb') as f: charmap = pickle.load(f, encoding="latin1") with open(os.path.join(args.input_dir, 'inv_charmap.pickle'), 'rb') as f: inv_charmap = pickle.load(f, encoding="latin1")I just changed those lines + added brackets to all print statements and that was it. I get a different error,
TypeError: Variable is unhashable.
but thats a seperate issue
Did you solved problem with "TypeError: Variable is unhashable."?
from passgan.
Did you solved problem with "TypeError: Variable is unhashable."?
As far as I know it's caused by newer tensorflow versions. I "fixed" it by changing lines 28-30 of file PassGAN/tflib/__init__.py
- result = _params[name]
+ result = _params[name].ref()
i = 0
- while result in _param_aliases:
+ while result in _param_aliases.keys(): #not sure if this is required
However now tensorflow has problems transforming the value into a tensor. in File "PassGAN/tflib/ops/linear.py", line 133, in Linear: ValueError: Attempt to convert a value (<Reference wrapping <tf.Variable 'Generator.Input/Generator.Input.W:0' shape=(128, 1280) dtype=float32, numpy= array([...], dtype=float32)>>) with an unsupported type (<class 'tensorflow.python.util.object_identity.Reference'>) to a Tensor.
I dont know enough about tensorflow to fix this. I tried using tf.identity to manually dereference the value, but that didnt work either. This project uses both python2 and outdated tensorflow versions. I dont know if its even worth the trouble
¯\(ツ)/¯
from passgan.
Related Issues (20)
- PassGAN did not compare with FLA? HOT 1
- Why use Tensorflow==1.4.1? HOT 2
- Syntax error in train.py ? HOT 4
- Errors in thread operation
- Question about PassGAN implementation HOT 6
- Requires CUDA 8 HOT 2
- How to train model with LinkedIn leak ? HOT 1
- Code has many errors HOT 5
- Will there be a ROCm version?
- Passgzn
- How do you use the thing?
- Python and syntax errors and more in this project
- failed to map segment from shared object
- Win 7
- Its not working HOT 1
- Auto Save Chekpoint and other staff.
- Conv2DCustomBackpropFilterOp only supports NHWC HOT 1
- about memory HOT 1
- i have three training datas. How to use train.py to process these data? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passgan.