Skip to content

ValueError: Cannot assign to variable block_1_1_ds_conv1/filters:0 due to variable shape (1, 1, 64, 256) and value shape (64,) are incompatible #348

Description

@AndreyStille

Please help.

Cannot load weights using infer,py. Weights are taken from google drive
(lightweight_openpose_resnet50.npz)

import cv2
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from hyperpose import Config,Model,Dataset
from hyperpose.Dataset import imread_rgb_float,imwrite_rgb_float
Config.set_model_name("LightweightOpenpose")
Config.set_model_backbone(Config.BACKBONE.Resnet50)
Config.set_model_type(Config.MODEL.LightweightOpenpose)
config=Config.get_config()

#get and load model
model=Model.get_model(config)
weight_path=f"{config.model.model_dir}/newest_model.npz"
model.load_weights('/content/hyperpose/save_dir/openpose/model_dir/newest_model.npz')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions