Coder Social home page Coder Social logo

siun's People

Contributors

minyuanye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

siun's Issues

Apple M1

How to fix? :(

Metal device set to: Apple M1

systemMemory: 16.00 GB
maxCacheSize: 5.33 GB

2022-11-20 01:54:17.446949: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:305] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support.

2022-11-20 01:54:17.447045: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:271] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -> physical PluggableDevice (device: 0, name: METAL, pci bus id: )

Traceback (most recent call last):

File ~/SIUN/code/deblur.py", line 50, in
Tester(config).start()
File ~/SIUN/code/src/tester.py", line 13, in init
self.model = DDModel(config)
File ~/SIUN/code/src/model/model.py", line 15, in init
self.generator = self.build_generator((None,None,6),(None,None,3))
File ~/SIUN/code/src/model/model.py", line 88, in build_generator
if(self.load(self.config.resource.generator_json_path,self.config.resource.generator_weights_path)):
File ~/SIUN/code/src/model/model.py", line 120, in load
self.model = model_from_json(loaded_model_json,custom_objects={'tf':tf})
File ~/miniconda3/lib/python3.9/site-packages/keras/saving/model_config.py", line 104, in model_from_json
return deserialize(config, custom_objects=custom_objects)
File ~/miniconda3/lib/python3.9/site-packages/keras/layers/serialization.py", line 207, in deserialize
return generic_utils.deserialize_keras_object(
File ~/miniconda3/lib/python3.9/site-packages/keras/utils/generic_utils.py", line 679, in deserialize_keras_object
deserialized_obj = cls.from_config(
File ~/miniconda3/lib/python3.9/site-packages/keras/engine/training.py", line 2641, in from_config
functional.reconstruct_from_config(config, custom_objects))
File ~/miniconda3/lib/python3.9/site-packages/keras/engine/functional.py", line 1326, in reconstruct_from_config
process_layer(layer_data)
File ~/miniconda3/lib/python3.9/site-packages/keras/engine/functional.py", line 1308, in process_layer
layer = deserialize_layer(layer_data, custom_objects=custom_objects)
File ~/miniconda3/lib/python3.9/site-packages/keras/layers/serialization.py", line 207, in deserialize
return generic_utils.deserialize_keras_object(
File ~/miniconda3/lib/python3.9/site-packages/keras/utils/generic_utils.py", line 679, in deserialize_keras_object
deserialized_obj = cls.from_config(
File ~/miniconda3/lib/python3.9/site-packages/keras/layers/core/lambda_layer.py", line 303, in from_config
function = cls._parse_function_from_config(config, custom_objects,
File ~/miniconda3/lib/python3.9/site-packages/keras/layers/core/lambda_layer.py", line 358, in _parse_function_from_config
function = generic_utils.func_load(config[func_attr_name], globs=globs)
File ~/miniconda3/lib/python3.9/site-packages/keras/utils/generic_utils.py", line 793, in func_load
code = marshal.loads(raw_code)

ValueError: bad marshal data (unknown type code)

Error while running the coda

I installed everything inside requirements.txt but got following error:

Traceback (most recent call last):
  File "C:\Users\siroj\Anaconda3\envs\siun\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
    ctypes.WinDLL(build_info.cudart_dll_name)
  File "C:\Users\siroj\Anaconda3\envs\siun\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "deblur.py", line 39, in <module>
    set_session_config(per_process_gpu_memory_fraction=1, allow_growth=True, device_list=args.gpu)
  File "E:\Sherzod\Projects\SIUN\code\src\lib\tf_util.py", line 10, in set_session_config
    import tensorflow as tf
  File "C:\Users\siroj\Anaconda3\envs\siun\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "C:\Users\siroj\Anaconda3\envs\siun\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\siroj\Anaconda3\envs\siun\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
    self_check.preload_check()
  File "C:\Users\siroj\Anaconda3\envs\siun\lib\site-packages\tensorflow\python\platform\self_check.py", line 82, in preload_check
    % (build_info.cudart_dll_name, build_info.cuda_version_number))
ImportError: Could not find 'cudart64_80.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 8.0 from this URL: https://developer.nvidia.com/cuda-toolkit

What does this error mean?

A little trick to use SIUN on Google Colab

This is not really a issue, but a little help for those who want to use this project directly on Google Colab without any installation requirement (the default preinstalled setting of Google Colab)

Code Trick

You just need to replace :

import tensorflow.as tf

by

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

in the head on the following two files :

  • /SIUN/code/src/lib/tf_util.py
  • /SIUN/code/src/model/model.py

allowing to the code working with tensorflow 2>

Notebook

Now create a simple notebook with a cell for the project cloning

!git clone https://github.com/minyuanye/SIUN.git

Another to set the working directory

%cd '/content/SIUN/code/'

For my own case, I mount Google Drive with this cell

from google.colab import drive
drive.mount('/content/gdrive', force_remount=True)

Now, just call the process

!python deblur.py --apply --dir-path='/content/gdrive/My Drive/myimagedir/'

An option is to build a zip of the result directory

!zip -r /content/output.zip /content/SIUN/code/output

That's all. Hope that helps.

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.