Hi,
I keep on getting an error even though I passed all of my tests: RuntimeError: Expected object of backend CUDA but got backend CPU for sequence element 1 in sequence argument at position #1 ‘tensors’
It is erroring on this function code
def combine_vectors(x, y):
'''
Function for combining two vectors with shapes (n_samples, ?) and (n_samples, ?).
Parameters:
x: (n_samples, ?) the first vector.
In this assignment, this will be the noise vector of shape (n_samples, z_dim),
but you shouldn't need to know the second dimension's size.
y: (n_samples, ?) the second vector.
Once again, in this assignment this will be the one-hot class vector
with the shape (n_samples, n_classes), but you shouldn't assume this in your code.
'''
# Note: Make sure this function outputs a float no matter what inputs it receives
#### START CODE HERE ####
combined = torch.cat((x.long(), y.long()), 1)
#### END CODE HERE ####
return combined.to(float)