Skip to content

Fail to show binarized weights #4

Open
@ky-du

Description

@ky-du

I've tried to print the binarized weights , but it seems that the weights are still unbinarized.

Here is the related code:

Forward + Backward + Optimize

    optimizer.zero_grad()
    outputs = cnn(images)
    print cnn.state_dict()['layer1.0.weight']
    loss = criterion(outputs, labels)
    loss.backward()
    optimizer.step()

And here is the results:
(95,1 ,.,.) =
1.00000e-02 *
-3.3969 2.1018 -3.1642
3.2847 0.9943 0.6272
0.4166 0.3461 -1.0757

(95,2 ,.,.) =
1.00000e-02 *
-0.1648 -3.8358 0.9648
0.0416 -1.2637 -0.7090
3.0703 -2.1837 -1.9243
.....

Could you help me check this problem? THX:)

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