Real-Time Video Super-Resolution Challenge

Jieson

New member
I have submit a ZIP archive to the test phase, but it failed. The error log is :

WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
Traceback (most recent call last):
File "/tmp/codalab/tmp2t1TT8/run/program/evaluate.py", line 68, in <module>
print("Latency: {}".format(latency))
NameError: name 'latency' is not defined


It seems like the readme file has the wrong format?
 

diggers

New member
I have converted the NONE_tflite successfully, but when to test on app, it raise error, how to do next?
 

Attachments

  • error.jpg
    error.jpg
    115.2 KB · Views: 8

Jieson

New member
The problem is that you are using the tf.lite.OpsSet.SELECT_TF_OPS option that allows the interpreter to use the standard TF (not TFLite) ops.

I remove these two lines of code and the conversion still outputs the same error。

2.The model convert code as follow:
converter = tf.lite.TFLiteConverter.from_keras_model(model_tf.build(input_shape=(1,None,None,30)))
tflite_model = converter.convert()

log.txt:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/tensor_util.py", line 549, in make_tensor_proto
str_values = [compat.as_bytes(x) for x in proto_values]
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/tensor_util.py", line 549, in <listcomp>
str_values = [compat.as_bytes(x) for x in proto_values]
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/util/compat.py", line 87, in as_bytes
(bytes_or_text,))
TypeError: Expected binary or unicode string, got None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 419, in build
self.call(x, **kwargs)
File "arch_shuffle_tf.py", line 83, in call
x_input = tf.transpose(tf.reshape(x_input,(x_input.shape[1],x_input.shape[2],T,C)),(2,0,1,3)) # T H W C
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
return target(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py", line 195, in reshape
result = gen_array_ops.reshape(tensor, shape, name)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 8378, in reshape
"Reshape", tensor=tensor, shape=shape, name=name)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 525, in _apply_op_helper
raise err
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py", line 515, in _apply_op_helper
preferred_dtype=default_dtype)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/profiler/trace.py", line 163, in wrapped
return func(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1540, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 339, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 265, in constant
allow_broadcast=True)
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 283, in _constant_impl
allow_broadcast=allow_broadcast))
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/tensor_util.py", line 553, in make_tensor_proto
"supported type." % (type(values), values))
TypeError: Failed to convert object of type <class 'tuple'> to Tensor. Contents: (None, None, 10, 3). Consider casting elements to a supported type.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "arch_shuffle_tf.py", line 224, in <module>
converter = tf.lite.TFLiteConverter.from_keras_model(model_tf.build(input_shape=(1,None,None,30)))
File "/opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 421, in build
raise ValueError('You cannot build your model by calling `build` '
 

Andrey Ignatov

Administrator
Staff member
have converted the NONE_tflite successfully, but when to test on app, it raise error, how to do next?

It's fine, the model with None dimensions will not be running with AI Benchmark.

It seems like the readme file has the wrong format?

We are checking this.

the result may be different from 10 of 100

Yes, if we notice some strange results - we will ask you to submit one additional model later.

remove these two lines of code and the conversion still outputs the same error

Ok, please send me your Python codes that you are using to convert the model by PM.
 
Top