tensorflow / lucid

A collection of infrastructure and tools for research in neural network interpretability.
Apache License 2.0
4.65k stars 655 forks source link

Errors Ctypes #299

Open PIETERJANAHENKONA opened 2 years ago

PIETERJANAHENKONA commented 2 years ago

AttributeError: module 'ctypes' has no attribute 'util' Also a lot of tenserflow errors

400lbhacker commented 2 years ago

find util.py and add it to directory, make sure to put the following colab magic line in the first code box %tensorflow_version 1.x

please post the colab link / tutorial you are following I will do my best to go through it and fix it... if you go to my github page I do have several fixxes for some tutorials I am not affiliated with lucid/tensorflow as an original founder but I do make extensive repairs to try to keep this project alive I work on it out sheer personal devotion, I will do my best to fix it but no garuntees this framework is becoming quickly deprecated

PIETERJANAHENKONA commented 2 years ago

https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/differentiable-parameterizations/style_transfer_3d.ipynb#scrollTo=GS4kqcEJuy5R

Outlook voor iOShttps://aka.ms/o0ukef downloaden


Van: joey tussin (Rib Addi) @.> Verzonden: Tuesday, March 22, 2022 9:49:46 AM Aan: tensorflow/lucid @.> CC: Ahenkona Pieter-Jan @.>; Author @.> Onderwerp: Re: [tensorflow/lucid] Errors Ctypes (Issue #299)

find util.py and add it to directory, make sure to put the following colab magic line in the first code box %tensorflow_version 1.x

please post the colab link / tutorial you are following I will do my best to go through it and fix it...

— Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftensorflow%2Flucid%2Fissues%2F299%23issuecomment-1074892256&data=04%7C01%7Cpieter-jan.ahenkona%40student.kdg.be%7Ce2ccb3fa3bd046d2ac0008da0be0eb7c%7Ced1fc57f8a9747e79de19302dfd786ae%7C0%7C0%7C637835357892274628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=WNBZTlE8bfzO4dokzvBOc%2BdbSx7JhHfF5tE9cjeO3Qo%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASWN642BTYLESZSKZWVJ2Q3VBGCSVANCNFSM5QTVEPUA&data=04%7C01%7Cpieter-jan.ahenkona%40student.kdg.be%7Ce2ccb3fa3bd046d2ac0008da0be0eb7c%7Ced1fc57f8a9747e79de19302dfd786ae%7C0%7C0%7C637835357892274628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=sXh5nuI9U3J3B1UqhUv1fYxtFpzftfQAtTcVNU72gbg%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

400lbhacker commented 2 years ago

find the lines: from IPython.display import clear_output, display, Image, HTML from lucid.misc.gl.glcontext import create_opengl_context import OpenGL.GL as gl

and add: from ctypes import util so it looks like this:

from IPython.display import clear_output, display, Image, HTML from ctypes import util from lucid.misc.gl.glcontext import create_opengl_context import OpenGL.GL as gl

the tutorial is super outdated, the model package containing the original .png texture and 3d .obj model are offline and even the style texture jpeg from wikipedia is offline. you need to upload your own model (.obj), original texture(png/jpg) and your desired style texture (png/jpg)

after testing around I kepped running into error [TypeError: '<' not supported between instances of 'numpy.ndarray' and 'str'] and this is above my comprehension I might have done somethign wrong (i always combined my codeboxxes) I am very tired i will try again tomorrow, let me know if you get same error

I had difficulty finding a .obj to test on, the one I used was very large (80 mb+) that might have something to do with it. erasing the line lead to a further error that "uv" was undeclared despite not having any refrence to it anyway... im not 100% sure thats an additional error on top of the original or if their directly related

PIETERJANAHENKONA commented 2 years ago

Thanks for the help but still does not work

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows


From: joey tussin (Rib Addi) @.> Sent: Tuesday, March 22, 2022 12:25:38 PM To: tensorflow/lucid @.> Cc: Ahenkona Pieter-Jan @.>; Author @.> Subject: Re: [tensorflow/lucid] Errors Ctypes (Issue #299)

find the lines: from IPython.display import clear_output, display, Image, HTML from lucid.misc.gl.glcontext import create_opengl_context import OpenGL.GL as gl

and add: from ctypes import util so it looks like this:

from IPython.display import clear_output, display, Image, HTML from ctypes import util from lucid.misc.gl.glcontext import create_opengl_context import OpenGL.GL as gl

the tutorial is super outdated, the model package containing the original .png texture and 3d .obj model are offline and even the style texture jpeg from wikipedia is offline. you need to upload your own model (.obj), original texture(png/jpg) and your desired style texture (png/jpg)

after testing around I kepped running into error [TypeError: '<' not supported between instances of 'numpy.ndarray' and 'str'] and this is above my comprehension I might have done somethign wrong (i always combined my codeboxxes) I am very tired i will try again tomorrow, let me know if you get same error

— Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftensorflow%2Flucid%2Fissues%2F299%23issuecomment-1075051246&data=04%7C01%7Cpieter-jan.ahenkona%40student.kdg.be%7Cd26fff7349344826588c08da0bf6b192%7Ced1fc57f8a9747e79de19302dfd786ae%7C0%7C0%7C637835451407432980%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6TZhR5kicDhWEAePpKBfZot3mJM6CFVod6l8Co5tCqs%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASWN643CB7WONA2IV7KZYBTVBGU3FANCNFSM5QTVEPUA&data=04%7C01%7Cpieter-jan.ahenkona%40student.kdg.be%7Cd26fff7349344826588c08da0bf6b192%7Ced1fc57f8a9747e79de19302dfd786ae%7C0%7C0%7C637835451407432980%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=VxWkK2SHEVzusvoyNLNPHxq6Kx5n6AcfKIGwMnvOpws%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>