Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training #1

Open
Zumbalamambo opened this issue Nov 30, 2017 · 3 comments
Open

Training #1

Zumbalamambo opened this issue Nov 30, 2017 · 3 comments
Labels

Comments

@Zumbalamambo
Copy link

how do I train in my own dataset?

@pochih
Copy link
Owner

pochih commented Jan 8, 2018

You need to extract video features.
Given a video, I slice it to 80 slices equally.
Then feed 80 slices into VGG16 net, and extract the last fully connected layer's output.
So the feature of a video will be a matrix with shape 80x4096.

@pochih pochih added the question label Jan 9, 2018
@sxs4337
Copy link

sxs4337 commented Feb 18, 2018

Thanks for the great code!
Are there any scripts for video feature extraction and other pre-processing steps that can be shared? These would be very helpful in running the code on other datasets.
Thanks in advance.

@sxs4337
Copy link

sxs4337 commented Feb 20, 2018

I was able to create the npy files for train features. When I start the training, I get this error-

Traceback (most recent call last):
File "python/train.py", line 288, in
train()
File "python/train.py", line 192, in train
train_op = tf.train.AdamOptimizer(learning_rate).minimize(tf_loss)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 325, in minimize
name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 446, in apply_gradients
self._create_slots([_get_variable_for(v) for v in var_list])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/adam.py", line 122, in _create_slots
self._zeros_slot(v, "m", self._name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 766, in _zeros_slot
named_slots[_var_key(var)] = slot_creator.create_zeros_slot(var, op_name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 174, in create_zeros_slot
colocate_with_primary=colocate_with_primary)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 146, in create_slot_with_initializer
dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 66, in _create_slot_var
validate_shape=validate_shape)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 1049, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 948, in get_variable
use_resource=use_resource, custom_getter=custom_getter)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 356, in get_variable
validate_shape=validate_shape, use_resource=use_resource)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 341, in _true_getter
use_resource=use_resource)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 671, in _get_single_variable
"VarScope?" % name)
ValueError: Variable Wemb/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

I am using Tensorflow version 1.1.0. There seems to be a workaround here-
tensorflow/tensorflow#6220

But I am unable to add to the train.py file. Any help is appreciated.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants