expected np.ndarray (got DataFrame)
I wanted to find out the output_size of a convolution operation, but I am strugglin with converting my dataframe into a tensor.
output_size = torch.nn.Conv2d(3, 5, 5,stride=1, padding=3,    
                dilation=1, groups=1, bias=True, padding_mode='zeros')

fashion = torch.from_numpy(load_fashion)
input_ = torch.Tensor((fashion.values), dtype=torch.float)  


output = output_size(input_)


I can't completely understand your problem as your code is not formatted properly in your question but the error is just an expected datatype error.
You need to convert your dataframe to a np array. Just add .values at the end of your dataframe. So if your input was a sample dataframe like so:
df = pd.DataFrame({&quot;Col1&quot;:[1,2,3,4], &quot;Col2&quot;:[2,2,3,4]})

Convert the whole thing to a numpy array like so:
sample_array = df.values

or convert one column to a np array like so:
sample_array_2 = df[&quot;Col1&quot;].values

Update:
As mentioned in the comments, pandas recommends .to_numpy() instead, so use something like:
sample_array = df.to_numpy()

