Giter Club home page Giter Club logo

liteflownet-tf2's People

Contributors

keeper121 avatar rogerhcheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

liteflownet-tf2's Issues

why do we need `module_feat()` in `matching()`?

I am wondering why would we need module_feat() within matching()? More specifically I did not find any reference from the original paper that says we need to apply a convolutional layer specifically for the level-2 features. Did I miss something here? Thanks!

def module_feat():
  if int_level == 2:
    return tf.keras.layers.Conv2D(filters=64, kernel_size=1, activation=lrelu, padding='valid')
  else:
    return tf.keras.Sequential()

Facing below issue while executing the eval script of liteflownet-tf2

2020-04-15 15:11:29.506122: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-04-15 15:11:29.522529: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.523168: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: Quadro P2000 major: 6 minor: 1 memoryClockRate(GHz): 1.4805
pciBusID: 0000:01:00.0
2020-04-15 15:11:29.523294: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-15 15:11:29.524134: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-04-15 15:11:29.524814: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-04-15 15:11:29.524966: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-04-15 15:11:29.525879: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-04-15 15:11:29.526613: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-04-15 15:11:29.528157: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-04-15 15:11:29.528250: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.528731: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.529145: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2020-04-15 15:11:29.529463: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-04-15 15:11:29.555211: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3696000000 Hz
2020-04-15 15:11:29.556537: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x565252f88ad0 executing computations on platform Host. Devices:
2020-04-15 15:11:29.556551: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Host, Default Version
2020-04-15 15:11:29.616349: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.616989: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x565252fbbe20 executing computations on platform CUDA. Devices:
2020-04-15 15:11:29.617002: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): Quadro P2000, Compute Capability 6.1
2020-04-15 15:11:29.617136: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.617879: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: Quadro P2000 major: 6 minor: 1 memoryClockRate(GHz): 1.4805
pciBusID: 0000:01:00.0
2020-04-15 15:11:29.617904: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-15 15:11:29.617914: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-04-15 15:11:29.617938: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-04-15 15:11:29.617959: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-04-15 15:11:29.617966: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-04-15 15:11:29.617991: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-04-15 15:11:29.618034: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-04-15 15:11:29.618128: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.618708: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.619273: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2020-04-15 15:11:29.619298: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-15 15:11:29.620168: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-04-15 15:11:29.620178: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0
2020-04-15 15:11:29.620186: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N
2020-04-15 15:11:29.620361: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.620937: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.621506: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4009 MB memory) -> physical GPU (device: 0, name: Quadro P2000, pci bus id: 0000:01:00.0, compute capability: 6.1)
WARNING:tensorflow:From /home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
2020-04-15 15:11:29.888289: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.888938: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: Quadro P2000 major: 6 minor: 1 memoryClockRate(GHz): 1.4805
pciBusID: 0000:01:00.0
2020-04-15 15:11:29.888976: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2020-04-15 15:11:29.888989: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-04-15 15:11:29.888996: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2020-04-15 15:11:29.889004: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2020-04-15 15:11:29.889011: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2020-04-15 15:11:29.889019: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2020-04-15 15:11:29.889031: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-04-15 15:11:29.889071: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.889662: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.890228: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2020-04-15 15:11:29.890247: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-04-15 15:11:29.890252: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165] 0
2020-04-15 15:11:29.890256: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0: N
2020-04-15 15:11:29.890431: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.891040: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-04-15 15:11:29.891619: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4009 MB memory) -> physical GPU (device: 0, name: Quadro P2000, pci bus id: 0000:01:00.0, compute capability: 6.1)
2020-04-15 15:11:32.498632: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at save_restore_v2_ops.cc:184 : Not found: Key flownet/feature_extractor/sequential/conv2d/bias not found in checkpoint
Traceback (most recent call last):
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call
return fn(*args)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn
target_list, run_metadata)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.NotFoundError: Key flownet/feature_extractor/sequential/conv2d/bias not found in checkpoint
[[{{node save/RestoreV2}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 1290, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 956, in run
run_metadata_ptr)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run
feed_dict_tensor, options, run_metadata)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run
run_metadata)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Key flownet/feature_extractor/sequential/conv2d/bias not found in checkpoint
[[node save/RestoreV2 (defined at /home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1751) ]]

Original stack trace for 'save/RestoreV2':
File "eval.py", line 42, in
saver = tf.train.Saver()
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 828, in init
self.build()
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 840, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 878, in _build
build_restore=build_restore)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 508, in _build_internal
restore_sequentially, reshape)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 328, in _AddRestoreOps
restore_sequentially)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 575, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/ops/gen_io_ops.py", line 1696, in restore_v2
name=name)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/op_def_library.py", line 793, in _apply_op_helper
op_def=op_def)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 3360, in create_op
attrs, op_def, compute_device)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 3429, in _create_op_internal
op_def=op_def)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 1751, in init
self._traceback = tf_stack.extract_stack()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 1300, in restore
names_to_keys = object_graph_key_mapping(save_path)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 1618, in object_graph_key_mapping
object_graph_string = reader.get_tensor(trackable.OBJECT_GRAPH_PROTO_KEY)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py", line 915, in get_tensor
return CheckpointReader_GetTensor(self, compat.as_bytes(tensor_str))
tensorflow.python.framework.errors_impl.NotFoundError: Key _CHECKPOINTABLE_OBJECT_GRAPH not found in checkpoint

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "eval.py", line 43, in
saver.restore(sess, args.model)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 1306, in restore
err, "a Variable name or other graph key that is missing")
tensorflow.python.framework.errors_impl.NotFoundError: Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key flownet/feature_extractor/sequential/conv2d/bias not found in checkpoint
[[node save/RestoreV2 (defined at /home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1751) ]]

Original stack trace for 'save/RestoreV2':
File "eval.py", line 42, in
saver = tf.train.Saver()
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 828, in init
self.build()
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 840, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 878, in _build
build_restore=build_restore)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 508, in _build_internal
restore_sequentially, reshape)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 328, in _AddRestoreOps
restore_sequentially)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/training/saver.py", line 575, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/ops/gen_io_ops.py", line 1696, in restore_v2
name=name)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/op_def_library.py", line 793, in _apply_op_helper
op_def=op_def)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 3360, in create_op
attrs, op_def, compute_device)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 3429, in _create_op_internal
op_def=op_def)
File "/home/abaghaie/anaconda2/envs/liteFlow/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 1751, in init
self._traceback = tf_stack.extract_stack()

TFLite

Is it possible to convert this tensorflow model to tflite and run the model on Android? Has someone ever tried ?

Running eval.py error: input and filter must have the same depth: 2 vs 1

Using tensorflow v2.3.1 with tensorflow-addons v0.12.0-dev on python v3.8.6. When I run eval.py with this command:

$ python eval.py

I get the following output:

2020-11-10 07:37:39.352852: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-11-10 07:37:39.372710: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2195535000 Hz
2020-11-10 07:37:39.373211: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55fe651ab9e0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-11-10 07:37:39.373243: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-11-10 07:37:39.373373: I tensorflow/core/common_runtime/process_util.cc:146] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 1365, in _do_call
    return fn(*args)
  File "/usr/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 1349, in _run_fn
    return self._call_tf_sessionrun(options, feed_dict, fetch_list,
  File "/usr/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 1441, in _call_tf_sessionrun
    return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict,
tensorflow.python.framework.errors_impl.InvalidArgumentError: input and filter must have the same depth: 2 vs 1
	[[{{node flownet/matching_2/flownet/matching_2/moduleUpflow/conv2d_transpose}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "eval.py", line 53, in <module>
    flow = sess.run(out, feed_dict={tens1: inp1, tens2: inp2})[0, :h, :w, :]
  File "/usr/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 957, in run
    result = self._run(None, fetches, feed_dict, options_ptr,
  File "/usr/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 1180, in _run
    results = self._do_run(handle, final_targets, final_fetches,
  File "/usr/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 1358, in _do_run
    return self._do_call(_run_fn, feeds, fetches, targets, options,
  File "/usr/lib/python3.8/site-packages/tensorflow/python/client/session.py", line 1384, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: input and filter must have the same depth: 2 vs 1
	[[node flownet/matching_2/flownet/matching_2/moduleUpflow/conv2d_transpose (defined at /home/curling_grad/Documents/liteflownet-tf2/model.py:55) ]]

Errors may have originated from an input operation.
Input Source operations connected to node flownet/matching_2/flownet/matching_2/moduleUpflow/conv2d_transpose:
 flownet/regularization_1/concat_2 (defined at /home/curling_grad/Documents/liteflownet-tf2/model.py:206)

Original stack trace for 'flownet/matching_2/flownet/matching_2/moduleUpflow/conv2d_transpose':
  File "eval.py", line 40, in <module>
    out = model(tens1, tens2)
  File "/home/curling_grad/Documents/liteflownet-tf2/model.py", line 257, in __call__
    flow = self.matching(tensor_feat1[i], tensor_feat2[i], flow, lvls[i], name='matching_%i' % abs(i))
  File "/home/curling_grad/Documents/liteflownet-tf2/model.py", line 88, in matching
    tensorFlow = module_upflow(tensorFlow)
  File "/home/curling_grad/Documents/liteflownet-tf2/model.py", line 71, in module_upflow
    return self.group_upconv(x, 2, name + '/moduleUpflow')
  File "/home/curling_grad/Documents/liteflownet-tf2/model.py", line 55, in group_upconv
    return tf.nn.conv2d_transpose(in1, filterc, output_shape, strides=[1, 2, 2, 1])
  File "/usr/lib/python3.8/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
    return target(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/tensorflow/python/ops/nn_ops.py", line 2559, in conv2d_transpose_v2
    return gen_nn_ops.conv2d_backprop_input(
  File "/usr/lib/python3.8/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 1293, in conv2d_backprop_input
    _, _, _op, _outputs = _op_def_library._apply_op_helper(
  File "/usr/lib/python3.8/site-packages/tensorflow/python/framework/op_def_library.py", line 742, in _apply_op_helper
    op = g._create_op_internal(op_type_name, inputs, dtypes=None,
  File "/usr/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 3477, in _create_op_internal
    ret = Operation(
  File "/usr/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 1949, in __init__
    self._traceback = tf_stack.extract_stack()

No output displayed

The out.flow file is not executed for display after the complete execution of eval.py. The out.flow file is created in the directory but I'm not sure how to access it.

IndexError: index -2147483648 is out of bounds for axis 0 with size 55

After following all the steps and running this line
!python eval.py --img1=./images/first.png --img2=./images/second.png --flow=./out.flow --display_flow=True

I got this error:

2020-07-21 10:55:35.414384: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-07-21 10:55:35.417596: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2020-07-21 10:55:35.417657: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (f67b6b6649c6): /proc/driver/nvidia/version does not exist
2020-07-21 10:55:35.418050: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-07-21 10:55:35.425086: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2300000000 Hz
2020-07-21 10:55:35.425369: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1bf6bc0 executing computations on platform Host. Devices:
2020-07-21 10:55:35.425406: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:From /root/.local/lib/python3.6/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
Traceback (most recent call last):
  File "eval.py", line 58, in <module>
    flow_color = flow_to_color(flow, convert_to_bgr=False)
  File "/content/drive/My Drive/Research Repos/optical flow/liteflownet-tf2/draw_flow.py", line 124, in flow_to_color
    return flow_compute_color(u, v, convert_to_bgr)
  File "/content/drive/My Drive/Research Repos/optical flow/liteflownet-tf2/draw_flow.py", line 83, in flow_compute_color
    col0 = tmp[k0] / 255.0
IndexError: index -2147483648 is out of bounds for axis 0 with size 55

.\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied.

I was trying to use pretraind model but, i encounter a lot of errors
here is the error:

If using Keras pass *_constraint arguments to layers.
Traceback (most recent call last):
File "eval.py", line 43, in
saver.restore(sess, args.model)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 1282, in restore
checkpoint_prefix)
ValueError: The passed save_path is not a valid checkpoint: ./model

(tenserflow-gpu) E:\liteflownet-tf2-master>python eval.py --img1=./images/first.png --img2=./images/second.png --flow=./out.flow --display_flow=True
2020-03-13 07:02:56.570752: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2020-03-13 07:03:00.731236: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2020-03-13 07:03:00.771839: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 2070 SUPER computeCapability: 7.5
coreClock: 1.77GHz coreCount: 40 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-03-13 07:03:00.784196: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2020-03-13 07:03:00.796133: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
2020-03-13 07:03:00.807408: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll
2020-03-13 07:03:00.816430: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll
2020-03-13 07:03:00.828165: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll
2020-03-13 07:03:00.838064: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll
2020-03-13 07:03:00.852324: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2020-03-13 07:03:00.857583: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2020-03-13 07:03:00.861343: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2020-03-13 07:03:00.868849: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 2070 SUPER computeCapability: 7.5
coreClock: 1.77GHz coreCount: 40 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 417.29GiB/s
2020-03-13 07:03:00.878764: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2020-03-13 07:03:00.884640: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
2020-03-13 07:03:00.890188: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll
2020-03-13 07:03:00.895876: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll
2020-03-13 07:03:00.901838: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll
2020-03-13 07:03:00.907615: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll
2020-03-13 07:03:00.913563: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2020-03-13 07:03:00.919343: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2020-03-13 07:03:01.573101: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-03-13 07:03:01.579850: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0
2020-03-13 07:03:01.584476: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N
2020-03-13 07:03:01.589626: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6281 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2070 SUPER, pci bus id: 0000:01:00.0, compute capability: 7.5)
WARNING:tensorflow:From C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py:1635: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
2020-03-13 07:03:04.969601: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied.
; Input/output error
2020-03-13 07:03:04.999509: W tensorflow/core/util/tensor_slice_reader.cc:95] Could not open .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied.
; Input/output error
2020-03-13 07:03:05.006567: W tensorflow/core/framework/op_kernel.cc:1655] OP_REQUIRES failed at save_restore_tensor.cc:175 : Data loss: Unable to open table file .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied.
; Input/output error
Traceback (most recent call last):
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1367, in _do_call
return fn(*args)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1352, in _run_fn
target_list, run_metadata)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1445, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied.
; Input/output error
[[{{node save/RestoreV2}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "eval.py", line 43, in
saver.restore(sess, args.model)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 1290, in restore
{self.saver_def.filename_tensor_name: save_path})
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 960, in run
run_metadata_ptr)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1183, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1361, in _do_run
run_metadata)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\client\session.py", line 1386, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file .\model: Unknown: NewRandomAccessFile failed to Create/Open: .\model : Access is denied.
; Input/output error
[[node save/RestoreV2 (defined at eval.py:42) ]]

Original stack trace for 'save/RestoreV2':
File "eval.py", line 42, in
saver = tf.train.Saver()
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 828, in init
self.build()
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 840, in build
self._build(self._filename, build_save=True, build_restore=True)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 878, in _build
build_restore=build_restore)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 508, in _build_internal
restore_sequentially, reshape)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 328, in _AddRestoreOps
restore_sequentially)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\training\saver.py", line 575, in bulk_restore
return io_ops.restore_v2(filename_tensor, names, slices, dtypes)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\ops\gen_io_ops.py", line 1506, in restore_v2
name=name)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 742, in _apply_op_helper
attrs=attr_protos, op_def=op_def)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3322, in _create_op_internal
op_def=op_def)
File "C:\Users\CVR 2019 2020.conda\envs\tenserflow-gpu\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1756, in init

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.