wojciechmo / gan Goto Github PK
View Code? Open in Web Editor NEWGenerate new images with Generative Adversarial Network and Tensorflow.
Generate new images with Generative Adversarial Network and Tensorflow.
File "", line 1, in
runfile('C:/Users/abhis/Downloads/Programs/gan-master/gan_train.py', wdir='C:/Users/abhis/Downloads/Programs/gan-master')
File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/abhis/Downloads/Programs/gan-master/gan_train.py", line 309, in
train()
File "C:/Users/abhis/Downloads/Programs/gan-master/gan_train.py", line 243, in train
fake_image = generator(latent_input, train_logical=True)
File "C:/Users/abhis/Downloads/Programs/gan-master/gan_train.py", line 214, in generator
act1 = gen_fc_block(input, GEN_H1, GEN_W1, GEN_D1, train_logical, 'fc1')
File "C:/Users/abhis/Downloads/Programs/gan-master/gan_train.py", line 148, in gen_fc_block
bn = batch_norm(conv, train_logical=train_logical, epsilon=1e-5, decay = 0.9, scope='bn')
File "C:/Users/abhis/Downloads/Programs/gan-master/gan_train.py", line 39, in batch_norm
m, v = tf.nn.moments(x, range(ndim - 1))
File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\nn_impl.py", line 690, in moments
mean = math_ops.reduce_mean(y, axes, keepdims=True, name="mean")
File "C:\Anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py", line 432, in new_func
return func(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py", line 1453, in reduce_mean
name=name))
File "C:\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 4793, in mean
name=name)
File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 528, in _apply_op_helper
(input_name, err))
ValueError: Tried to convert 'reduction_indices' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].
i used pydb so i detect that error coming from this line 39 m, v = tf.nn.moments(x, range(ndim - 1))
python make_record.py --images-path=./data --record-path=./train.record
Traceback (most recent call last):
File "make_record.py", line 20, in
for img_path in os.listdir(images_path):
OSError: [Errno 2] No such file or directory: './data'
Is it possible to retrain a previously trained model instead of restarting every time from the beginning?
Can you please add a way to restore a previous model training? Currently if the script/computer is interrupted, you have to start the training over again.
I tried to add the restore myself but it seems like you have to save some extra stuff if you plan to restore, which the script is currently not saving.
Hi, I'm getting this error.
File "make_record.py", line 30, in <module>
record.write(img.tostring())
TypeError: write() argument must be str, not bytes
I have my digits folder (all bmp files with the same size) inside the gan folder. I tried to run the script using this command:
python make_record.py --images-path=./digits --record-path=./train
Please help.
hi
I try to train with 1100 image(126*126) and after run :
1- python make_record.py --images-path=./data --record-path=./train.record
2- python gan_train.py
but console give me this error :
Traceback (most recent call last):
File "gan_train.py", line 310, in <module>
train()
File "gan_train.py", line 244, in train
fake_image = generator(latent_input, train_logical=True)
File "gan_train.py", line 217, in generator
act3 = gen_conv_block(act2, GEN_D3, train_logical, 'conv3')
File "gan_train.py", line 127, in gen_conv_block
conv = conv_transpose(x, depth, kernel=[5,5], strides=[2,2], name='conv')
File "gan_train.py", line 111, in conv_transpose
out_shape = [in_batch, in_height*strides[0], in_width*strides[1], out_depth]
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
python version : 3.5
OS : windows 10
I have no idea what this even means, I have slightly modified the file for it to work by using tips from the internet. The modification I have made is near the top of the file where I changed import tensorflow as tf
to
import tensorflow.compat.v1 as tf tf.disable_v2_behavior()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.