view_generative_model.py fail to generate animation
- Dominant language
- Python
- Stars
- 4.1k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have successfully trained the transition model.
Now I'm going to generate the gif of the predicted image.
I followed instructions:
```
$ ./server.py --time 60 --batch 64
$ ./view_generative_model.py transition --name transition
```
I got an error:
```
loading weights...
Traceback (most recent call last):
File "./view_generative_model.py", line 71, in
x = X.reshape((sh[0], args.time, 80, 160, 3))
ValueError: cannot reshape array of size 147456000 into shape (64,1,80,160,3)
```
I thought I may need to make the input size matched, I add time and batch options as:
```
$ ./view_generative_model.py transition --name transition --batch 64 --time 60
```
I got another error:
```
loading weights...
Sampling...
0%| | 0/128 [00:00
code = sess.run([E_out[0]], feed_dict={I: x, K.learning_phase(): 1})[0]
File "/home/tajima/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
File "/home/tajima/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 943, in _run
% (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (3840, 80, 160, 3) for Tensor u'transition/input_1:0', which has shape '(960, 80, 160, 3)'
```
How can I make it work?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with view_generative_model.py and reproduce the documented commands after reviewing server.py's --time and --batch handling. Trace the reshape at line 71 and the feed at line 83, comparing their expected dimensions with the generated input. Done means the transition command runs successfully and produces the requested GIF.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100