def get_output_dim(net_spec_file, net_spec_attr, input):
    """Get the output dim so you don't need to manually calculate
    the dimensions of network
    :param net_spec_file:
    :param input: The input should be a legal input of the net
    :return: A shape(tuple)
    """
    from configs import utils, config_manager
    from torch.autograd import Variable
    input = Variable(input)
    net_spec_file = net_spec_file
    net_mgr = config_manager.NetConfig(net_spec_file)
    net = utils.build(net_mgr.cfg[net_spec_attr])
    output = net(input)
    return output.shape
