Open Tmcsn opened 5 years ago
Seem that si(img,img2)
can not forward correctly. Can you check the code again? thanks.
(I test your code pytorch 1.0.0)
RuntimeError: Given groups=1, weight of size [64, 1, 10, 10], expected input[1, 3, 96, 96] to have 1 channels, but got 3 channels instead
class Siamese(nn.Module):
—————————————— si=Siamese() img=torch.rand(1,3,96,96) img2=torch.rand(1,3,96,96) writer=SummaryWriter(comment='bcnn') writer.add_graph(si(img,img2),(img,img2))
error occured: /opt/conda/conda-bld/pytorch_1532581333611/work/torch/csrc/jit/tracer.h:143: getTracingState: Assertion
var_state == state
failed.