Skip to content

Google Colab notebook currently not working #2

@pnmartinez

Description

@pnmartinez

Hello! First of all, thank you for the contribution!

The error

I was trying to see what the model comes up to, so I went for the Google Colab linked.

However, there may be a torchversion problem (just my hypothesis), as I am getting a **dimension mismatch error while initializing the generators and discriminators (the cells to "Prepare the networks"). See log below.

---------------------------------------------------------------------------

RuntimeError                              Traceback (most recent call last)

<ipython-input-15-a6589232276f> in <module>()
----> 1 g_ab, g_ba, d_a, d_b = get_cycle_gan_network(G_INPUT_DIM, G_OUTPUT_DIM, device, PAD_IDX, SOS_IDX, True, True)

2 frames

/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict)
    845         if len(error_msgs) > 0:
    846             raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
--> 847                                self.__class__.__name__, "\n\t".join(error_msgs)))
    848         return _IncompatibleKeys(missing_keys, unexpected_keys)
    849 

RuntimeError: Error(s) in loading state_dict for Seq2Seq:
	size mismatch for encoder.embedding.weight: copying a param with shape torch.Size([9887, 256]) from checkpoint, the shape in current model is torch.Size([9889, 256]).
	size mismatch for decoder.embedding.weight: copying a param with shape torch.Size([9887, 256]) from checkpoint, the shape in current model is torch.Size([9889, 256]).
	size mismatch for decoder.out.weight: copying a param with shape torch.Size([9887, 512]) from checkpoint, the shape in current model is torch.Size([9889, 512]).
	size mismatch for decoder.out.bias: copying a param with shape torch.Size([9887]) from checkpoint, the shape in current model is torch.Size([9889]).

Discussion

The Colab notebook should be updated in order for it to be useful. Do you have any idea what may be happening here? @eliorav

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions