lm1b/utils/model.py
def sharded_linear( input, shape, num_shards ):
    """
    todo: see if tf's built in variable sharding can replace
    :param input:
    :param shape:
    :param num_shards:
    :return:
    """
    w = create_sharded_weights( shape, num_shards=num_shards )
    b = tf.get_variable( "b", shape=(1, shape[1],), dtype=tf.float32 )
    return tf.matmul( input, w ) + b

    todo: see if tf's built in variable sharding can replace
    :param input:
    :param shape:
    :param num_shards:
    :return:
    
see if tf's built in variable sharding can replace
see if tf ' s built in variable sharding can replace
def sharded_linear( input, shape, num_shards ):
    w = create_sharded_weights( shape, num_shards=num_shards )
    b = tf.get_variable( "b", shape=(1, shape[1],), dtype=tf.float32 )
    return tf.matmul( input, w ) + b
def sharded_linear ( input , shape , num_shards ) : w = create_sharded_weights ( shape , num_shards = num_shards ) b = tf . get_variable ( "b" , shape = ( 1 , shape [ 1 ] , ) , dtype = tf . float32 ) return tf . matmul ( input , w ) + b
todo: see if tf's built in variable sharding can replace
todo : see if tf ' s built in variable sharding can replace
"""
    todo: see if tf's built in variable sharding can replace
    :param input:
    :param shape:
    :param num_shards:
    :return:
    """
None
input
None
shape
None
num_shards
None