I am trying to implement LRCN,witch input as (Batch, time,H,W).Then it needs 5D tensor . And pytorch has conv3d wtich I want to use . BUT there are many models trained by using conv2d. Now I want to transform a pytorch model witch use conv2d into a new model using conv3d. Dose it make sence?
def filter2d_to_3d(weight2d, weight3d):
nb_filter, channel, Time, h, w = weight3d.size()
for i in range(Time):
weight3d[:,:,i,:,:] = weight2d.data #Time aways =1 ,
return weight3d #conv3d's weight should be like this: weight3d[:,:,0,:,:] = weight2d.data