Then this method might work alright.
A problem in the original solution could have been that the output tensor called concat would very large since tensor_A would be 64x64=4096 times larger than what it needed to be. Using only .view() and .expand() will probably fix this problem as the 4096 repeated values are not physical but are just references to the same memory addresses.
Another idea could be to concatenate these inputs later in a neural net. I.e. if you are using a convolutional neural network for your images you can have an encoder part that extract information to a linear layer, at which point you add in these 1 dimensional features from tensor_B before subsequent linear layers.