I can't find sports1M_weights_tf.h5 and sports1M_weights_tf.json
youssefoumate opened this issue · 5 comments
youssefoumate commented
Hello Sir,
FileNotFoundError: [Errno 2] No such file or directory: 'models/sports1M_weights_tf.json'
I can't find those two files !!
chuckcho commented
@youssefoumate it appears that convert_caffe_model.py
didn't run successfully. What do you see when you run that?
youssefoumate commented
thank you sir for your reply
I get this error :
Using TensorFlow backend.
[Info] image_dim_order (from default ~/.keras/keras.json)=<function image_dim_ordering at 0x7fb1cebfabf8>
/home/youssef/c3d-keras/c3d_model.py:22: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(64, (3, 3, 3), padding="same", activation="relu", name="conv1", input_shape=(3, 16, 11...)`
input_shape=input_shape))
/home/youssef/c3d-keras/c3d_model.py:24: UserWarning: Update your `MaxPooling3D` call to the Keras 2 API: `MaxPooling3D(pool_size=(1, 2, 2), strides=(1, 2, 2), name="pool1", padding="valid")`
border_mode='valid', name='pool1'))
/home/youssef/c3d-keras/c3d_model.py:27: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(128, (3, 3, 3), padding="same", activation="relu", name="conv2")`
border_mode='same', name='conv2'))
/home/youssef/c3d-keras/c3d_model.py:29: UserWarning: Update your `MaxPooling3D` call to the Keras 2 API: `MaxPooling3D(pool_size=(2, 2, 2), strides=(2, 2, 2), name="pool2", padding="valid")`
border_mode='valid', name='pool2'))
/home/youssef/c3d-keras/c3d_model.py:32: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(256, (3, 3, 3), padding="same", activation="relu", name="conv3a")`
border_mode='same', name='conv3a'))
/home/youssef/c3d-keras/c3d_model.py:34: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(256, (3, 3, 3), padding="same", activation="relu", name="conv3b")`
border_mode='same', name='conv3b'))
/home/youssef/c3d-keras/c3d_model.py:36: UserWarning: Update your `MaxPooling3D` call to the Keras 2 API: `MaxPooling3D(pool_size=(2, 2, 2), strides=(2, 2, 2), name="pool3", padding="valid")`
border_mode='valid', name='pool3'))
Traceback (most recent call last):
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 671, in _call_cpp_shape_fn_impl
input_tensors_as_shapes, status)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/contextlib.py", line 66, in __exit__
next(self.gen)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Negative dimension size caused by subtracting 2 from 1 for 'pool3/MaxPool3D' (op: 'MaxPool3D') with input shapes: [?,1,4,28,256].
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "convert_caffe_model.py", line 121, in <module>
main()
File "convert_caffe_model.py", line 51, in main
model = c3d_model.get_model(summary=True, backend=dim_ordering)
File "/home/youssef/c3d-keras/c3d_model.py", line 36, in get_model
border_mode='valid', name='pool3'))
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/keras/models.py", line 466, in add
output_tensor = layer(self.outputs[0])
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/keras/engine/topology.py", line 585, in __call__
output = self.call(inputs, **kwargs)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/keras/layers/pooling.py", line 323, in call
data_format=self.data_format)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/keras/layers/pooling.py", line 381, in _pooling_function
padding, data_format, pool_mode='max')
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py", line 3286, in pool3d
x = tf.nn.max_pool3d(x, pool_size, strides, padding=padding)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 1665, in max_pool3d
strides=strides, padding=padding, name=name)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 768, in apply_op
op_def=op_def)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 2338, in create_op
set_shapes_for_outputs(ret)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1719, in set_shapes_for_outputs
shapes = shape_func(op)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1669, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 610, in call_cpp_shape_fn
debug_python_shape_fn, require_shape_fn)
File "/home/youssef/.conda/envs/MD3DNet/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 676, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Negative dimension size caused by subtracting 2 from 1 for 'pool3/MaxPool3D' (op: 'MaxPool3D') with input shapes: [?,1,4,28,256].
youssefoumate commented
oh sorry sorry !
Actually I was using Keras version 2
and this line : dim_ordering = K._image_dim_ordering
wasn't working for me
so I change it to that : dim_ordering = K.image_dim_ordering
which wasn't a good idea 👎
but now I'm using Keras 1.2.0
it works fine :)
chuckcho commented
Good to know it's now working. ;)
huangjiapei commented
hello!I cannot download sports1M_weights_tf.h5,could you send to me,1747199078@qq.com!Thank you.