(vec3)
return vec3_ssm
compute the skew symmetric matrix for cross product
    
    Arguments:
        vec {vector of shape [batch_size, 3, 1]}
compute the skew symmetric matrix for cross product
    
    Arguments:
        vec {vector of shape [batch_size, 3, 1]}
compute the skew symmetric matrix for cross product Arguments : vec { vector of shape [ batch_size 3 1 ] }
def skew_symmetric_mat3(vec3):
    """compute the skew symmetric matrix for cross product
    
    Arguments:
        vec {vector of shape [batch_size, 3, 1]}
    """
    bs = tf.shape(vec3)[0]      # batch size
    a1 = tf.slice(vec3, [0,0,0], [-1,1,-1])
    a2 = tf.slice(vec3, [0,1,0], [-1,1,-1])
    a3 = tf.slice(vec3, [0,2,0], [-1,1,-1])
    zeros = tf.zeros([bs, 1, 1])
    row1 = tf.concat([zeros, -a3, a2], axis=2)
    row2 = tf.concat([a3, zeros, -a1], axis=2)
    row3 = tf.concat([-a2, a1, zeros], axis=2)
    vec3_ssm = tf.concat([row1, row2, row3], axis=1)
    return vec3_ssm
def skew_symmetric_mat3 ( vec3 ) : bs = tf . shape ( vec3 ) [ 0 ] # batch size a1 = tf . slice ( vec3 , [ 0 , 0 , 0 ] , [ - 1 , 1 , - 1 ] ) a2 = tf . slice ( vec3 , [ 0 , 1 , 0 ] , [ - 1 , 1 , - 1 ] ) a3 = tf . slice ( vec3 , [ 0 , 2 , 0 ] , [ - 1 , 1 , - 1 ] ) zeros = tf . zeros ( [ bs , 1 , 1 ] ) row1 = tf . concat ( [ zeros , - a3 , a2 ] , axis = 2 ) row2 = tf . concat ( [ a3 , zeros , - a1 ] , axis = 2 ) row3 = tf . concat ( [ - a2 , a1 , zeros ] , axis = 2 ) vec3_ssm = tf . concat ( [ row1 , row2 , row3 ] , axis = 1 ) return vec3_ssm