Comments (4)
I've removed all the tf.get_variable_scope().reuse_variables() and solve this problem, but I'm new to tf and not clear about the consequence.
from s2vt.
It seems adding a scope before model construction is feasible.
with tf.variable_scope(tf.get_variable_scope()) as scope:
tf_loss, tf_video, tf_video_mask, tf_caption, tf_caption_mask, tf_probs = model.build_model()
from s2vt.
def build_model(self): tf.variable_scope().reuse_variables() def build_generator(self): tf.variable_scope().reuse_variables()
change to
with tf.variable_scope("model") as scope: scope.reuse_variables() with tf.variable_scope("generator") as scope: scope.reuse_variables()
It works. I'm new in tensorflow. Now I can't tell what happened.
from s2vt.
@Dateios Did you meet this error after adding a scope? I fix the previous error using your solution, however, i meet the following error.
/home2/xzhe3946/S2VT/model_RGB.py in build_model(self)
66 with tf.variable_scope("LSTM1"):
67 tf.reset_default_graph()
---> 68 output1, state1 = self.lstm1(image_emb[:,i,:], state1)
69
70 with tf.variable_scope("LSTM2"):
/usr/lib/python2.7/contextlib.pyc in exit(self, type, value, traceback)
33 value = type()
34 try:
---> 35 self.gen.throw(type, value, traceback)
36 raise RuntimeError("generator didn't stop after throw()")
37 except StopIteration, exc:
/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.pyc in variable_scope(name_or_scope, default_name, values, initializer, regularizer, caching_device, partitioner, custom_getter, reuse, dtype)
1461 old_name_scope=scope,
1462 dtype=dtype) as vs:
-> 1463 yield vs
1464
1465
/usr/lib/python2.7/contextlib.pyc in exit(self, type, value, traceback)
33 value = type()
34 try:
---> 35 self.gen.throw(type, value, traceback)
36 raise RuntimeError("generator didn't stop after throw()")
37 except StopIteration, exc:
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.pyc in get_controller(self, default)
3614 finally:
3615 if self._enforce_nesting:
-> 3616 if self.stack[-1] is not default:
3617 raise AssertionError(
3618 "Nesting violated for default stack of %s objects"
IndexError: list index out of range
from s2vt.
Related Issues (20)
- Download MSVD HOT 7
- How can I download MSVD videos, not the csv file. HOT 1
- Rationale behind using stacked LSTM
- TypeError: 'map' object is not subscriptable HOT 1
- [Deprication warning] in rnn_cell.BasicLSTMCell
- error when running model_RGB.train()
- Time taken to run the code
- Can you upload the features file?
- optical flow
- How to import caffe? HOT 1
- In training getting IndexError: too many indices for array
- KeyError: 'video_path' in Model_RGB
- where do i download the MSVD csv files
- test error HOT 2
- Unable to reproduce the results mentioned HOT 2
- how long is the train time?
- How about GPU? HOT 5
- What version of Caffe should I install?
- Error running model_RGB.train() HOT 9
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 s2vt.