d-smirnov commented on a change in pull request #6228:
URL: https://github.com/apache/incubator-tvm/pull/6228#discussion_r468032556



##########
File path: tests/python/frontend/tflite/test_forward.py
##########
@@ -2456,25 +2456,27 @@ def test_forward_sparse_to_dense():
 # Fully Connected
 # ---------------
 
-def _test_fully_connected(tensor_in_sizes, filter_in_sizes, bias_in_size=None):
+def _test_fully_connected(tensor_in_sizes, wrap_input, filter_in_sizes, 
bias_in_size=None):
     """ One iteration of fully connected """
 
-    total_size_1 = 1
-    total_size_2 = 1
-    for s in tensor_in_sizes:
-        total_size_1 *= s
-    for s in filter_in_sizes:
-        total_size_2 *= s
-    # Initializes the input tensor with array containing incrementing
-    # numbers from 1.
-    data_array = [f * 1.0 for f in range(1, total_size_1 + 1)]
-    filter_array = [f * 1.0 for f in range(1, total_size_2 + 1)]
+    total_size_1 = np.prod( tensor_in_sizes )
+    total_size_2 = np.prod( filter_in_sizes )
+
     assert int(total_size_1 / tensor_in_sizes[0]) == filter_in_sizes[0], \
         "input size and filter size are mismatched"
 
+    # Initializes the input tensor with array containing incrementing
+    # numbers from 1.
+    data_array = np.arange(1, total_size_1 + 1, dtype=np.float32)
+    filter_array = np.arange(1, total_size_2 + 1, dtype=np.float32)
+
     with tf.Graph().as_default():
-        in_data = array_ops.placeholder(shape=tensor_in_sizes, dtype='float32')
-        in_filter = constant_op.constant(filter_array, shape=filter_in_sizes, 
dtype='float32')
+        in_name="input"

Review comment:
       Some networks uses literal value instead of tensor placeholder for first 
argument. wrap flag switches the wrapping of the actual value of first operand.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to