Git Product home page Git Product logo

Comments (3)

xiaoerjason avatar xiaoerjason commented on May 27, 2024

----------------- Options ---------------
aspect_ratio: 1.0
batch_size: 2
checkpoints_dir: ./checkpoints
crop_size: 256
dataroot: ./test_img [default: ./datasets/BCI]
dataset_mode: aligned
direction: AtoB
display_winsize: 256
epoch: latest
eval: False
gpu_ids: 0
init_gain: 0.02
init_type: normal
input_nc: 3
isTrain: False [default: None]
load_iter: 0 [default: 0]
load_size: 320
max_dataset_size: inf
model: pix2pix
n_layers_D: 3
name: pyramidpix2pix
ndf: 64
netD: basic
netG: resnet_9blocks
ngf: 64
no_dropout: False
no_flip: False
norm: batch
num_test: 1000
num_threads: 4
output_nc: 3
pattern: L1_L2_L3_L4
phase: test
preprocess: scale_width_and_midcrop
results_dir: ./results/
serial_batches: False
suffix:
verbose: False
----------------- End -------------------

from bci.

SantJay avatar SantJay commented on May 27, 2024

这可能是pytorch版本和模型不匹配造成的。我们使用的pytorch版本为1.9.0,您可以使用和我们一样的版本测试一下。

from bci.

arsham-khafan avatar arsham-khafan commented on May 27, 2024

@xiaoerjason , @SantJay hello I have the exact same problem I am using PyTorch 1.9.0 but the error is exactly the same!
I have tried everything but I can't generate images using pre-trained model here is the exact issue:
----------------- Options ---------------
aspect_ratio: 1.0
batch_size: 2
checkpoints_dir: ./checkpoints
crop_size: 256
dataroot: ./datasets/BCI
dataset_mode: aligned
direction: AtoB
display_winsize: 256
epoch: latest
eval: False
gpu_ids: -1
init_gain: 0.02
init_type: normal
input_nc: 3
isTrain: False [default: None]
load_iter: 0 [default: 0]
load_size: 320
max_dataset_size: inf
model: pix2pix
n_layers_D: 3
name: pyramidpix2pix
ndf: 64
netD: basic
netG: resnet_9blocks
ngf: 64
no_dropout: False
no_flip: False
norm: batch
num_test: 1000
num_threads: 4
output_nc: 3
pattern: L1_L2_L3_L4
phase: test
preprocess: scale_width_and_midcrop
results_dir: ./results/
serial_batches: False
suffix:
verbose: False
----------------- End -------------------
dataset [AlignedDataset] was created
initialize network with normal
model [Pix2PixModel] was created
loading the model from ./checkpoints\pyramidpix2pix\latest_net_G.pth
Traceback (most recent call last):
File "test.py", line 47, in
model.setup(opt) # regular setup: load and print networks; create schedulers
File .\base_model.py", line 88, in setup
self.load_networks(load_suffix)
File ".\base_model.py", line 198, in load_networks
self.__patch_instance_norm_state_dict(state_dict, net, key.split('.'))
File ".\base_model.py", line 174, in __patch_instance_norm_state_dict
self.__patch_instance_norm_state_dict(state_dict, getattr(module, key), keys, i + 1)
File ".\base_model.py", line 174, in __patch_instance_norm_state_dict
self.__patch_instance_norm_state_dict(state_dict, getattr(module, key), keys, i + 1)
File ".\torch\nn\modules\module.py", line 1130, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Sequential' object has no attribute 'model'

from bci.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.