Category Archives: Tensorflow

Phil 3.26.18

But this occasional timidity is characteristic of almost all herding creatures. Though banding together in tens of thousands, the lion-maned buffaloes of the West have fled before a solitary horseman. Witness, too, all human beings, how when herded together in the sheepfold of a theatre’s pit, they will, at the slightest alarm of fire, rush helter-skelter for the outlets, crowding, trampling, jamming, and remorselessly dashing each other to death. Best, therefore, withhold any amazement at the strangely gallied whales before us, for there is no folly of the beasts of the earth which is not infinitely outdone by the madness of men.

—-Moby Dick, The Grand Armada

8:30 – 4:30 ASRC MKT

  • Finished BIC and put the notes on Phlog
  • Exposure to Opposing Views can Increase Political Polarization: Evidence from a Large-Scale Field Experiment on Social Media
    • There is mounting concern that social media sites contribute to political polarization by creating “echo chambers” that insulate people from opposing views about current events. We surveyed a large sample of Democrats and Republicans who visit Twitter at least three times each week about a range of social policy issues. One week later, we randomly assigned respondents to a treatment condition in which they were offered financial incentives to follow a Twitter bot for one month that exposed them to messages produced by elected officials, organizations, and other opinion leaders with opposing political ideologies. Respondents were re-surveyed at the end of the month to measure the effect of this treatment, and at regular intervals throughout the study period to monitor treatment compliance. We find that Republicans who followed a liberal Twitter bot became substantially more conservative post-treatment, and Democrats who followed a conservative Twitter bot became slightly more liberal post-treatment. These findings have important implications for the interdisciplinary literature on political polarization as well as the emerging field of computational social science.
  • More Keras
  • hyperopt is a Python library for optimizing over awkward search spaces with real-valued, discrete, and conditional dimensions.
  • One Hidden Layer:
    training label size =  60000
    test label size =  10000
    60000 train samples
    10000 test samples
    _________________________________________________________________
    Layer (type)                 Output Shape              Param #   
    =================================================================
    dense_1 (Dense)              (None, 128)               100480    
    _________________________________________________________________
    activation_1 (Activation)    (None, 128)               0         
    _________________________________________________________________
    dense_2 (Dense)              (None, 128)               16512     
    _________________________________________________________________
    activation_2 (Activation)    (None, 128)               0         
    _________________________________________________________________
    dense_3 (Dense)              (None, 128)               16512     
    _________________________________________________________________
    activation_3 (Activation)    (None, 128)               0         
    _________________________________________________________________
    dense_4 (Dense)              (None, 10)                1290      
    _________________________________________________________________
    activation_4 (Activation)    (None, 10)                0         
    =================================================================
    Total params: 134,794
    Trainable params: 134,794
    Non-trainable params: 0
  • Two hidden layers:
    training label size =  60000
    test label size =  10000
    60000 train samples
    10000 test samples
    _________________________________________________________________
    Layer (type)                 Output Shape              Param #   
    =================================================================
    dense_1 (Dense)              (None, 128)               100480    
    _________________________________________________________________
    activation_1 (Activation)    (None, 128)               0         
    _________________________________________________________________
    dense_2 (Dense)              (None, 128)               16512     
    _________________________________________________________________
    activation_2 (Activation)    (None, 128)               0         
    _________________________________________________________________
    dense_3 (Dense)              (None, 128)               16512     
    _________________________________________________________________
    activation_3 (Activation)    (None, 128)               0         
    _________________________________________________________________
    dense_4 (Dense)              (None, 10)                1290      
    _________________________________________________________________
    activation_4 (Activation)    (None, 10)                0         
    =================================================================
    Total params: 134,794
    Trainable params: 134,794
    Non-trainable params: 0

Phil 3.23.18

7:00 – 5:00 ASRC MKT

  • Influence of augmented humans in online interactions during voting events
    • Overwhelming empirical evidence has shown that online social dynamics mirrors real-world events. Hence, understanding the mechanisms leading to social contagion in online ecosystems is fundamental for predicting, and even manouvering, human behavior. It has been shown that one of such mechanisms is based on fabricating armies of automated agents that are known as social bots. Using the recent Italian elections as an emblematic case study, here we provide evidence for the existence of a special class of highly influential users, that we name “augmented humans”. They exploit bots for enhancing both their visibility and influence, generating deep information cascades to the same extent of news media and other broadcasters. Augmented humans uniformly infiltrate across the full range of identified clusters of accounts, the latter reflecting political parties and their electoral ranks.
  • Reddit and the Struggle to Detoxify the Internet
    • “Does free speech mean literally anyone can say anything at any time?” Tidwell continued. “Or is it actually more conducive to the free exchange of ideas if we create a platform where women and people of color can say what they want without thousands of people screaming, ‘Fuck you, light yourself on fire, I know where you live’? If your entire answer to that very difficult question is ‘Free speech,’ then, I’m sorry, that tells me that you’re not really paying attention.”
    • This is the difference between discussion and stampede. That seems like it should be statistically detectable.
  • Metabolic Costs of Feeding Predictively Alter the Spatial Distribution of Individuals in Fish Schools
    • We examined individual positioning in groups of swimming fish after feeding
    • Fish that ate most subsequently shifted to more posterior positions within groups
    • Shifts in position were related to the remaining aerobic scope after feeding
    • Feeding-related constraints could affect leadership and group functioning
    • I wonder if this also keeps the hungrier fish at the front, increasing the effectiveness of gradient detections
  • Listening to Invisibilia: The Pattern Problem. There is a section on using machine learning for sociology. Listening to get the author of the ML and Sociology study. Predictions were not accurate. Not published?
  • The Coming Information Totalitarianism in China
    • The real-name system has two purposes. One is the chilling effect, and it works very well on average netizens but not so much on activists. The other and the main purpose is to be able to locate activists and eliminate them from certain information/opinion platforms, in the same way that opinions of dissident intellectuals are completely eradicated from the traditional media.
  • More BIC – Done! Need to assemble notes
    • It is a central component of resolute choice, as presented by McClennen, that (unless new information becomes available) later transient agents recognise the authority of plans made by earlier agents. Being resolute just is recognising that authority (although McClennen’ s arguments for the rationality and psychological feasibility of resoluteness apply only in cases in which the earlier agents’ plans further the common ends of earlier and later agents). This feature of resolute choice is similar to Bacharach’ s analysis of direction, explained in section 5. If the relationship between transient agents is modelled as a sequential game, resolute choice can be thought of as a form of direction, in which the first transient agent plays the role of director; the plan chosen by that agent can be thought of as a message sent by the director to the other agents. To the extent that each later agent is confident that this plan is in the best interests of the continuing person, that confidence derives from the belief that the first agent identified with the person and that she was sufficiently rational and informed to judge which sequence of actions would best serve the person’s objectives. (pg 197)
  • Meeting with celer scientific
  • More TF with Keras. Really good progress

Phil 3.22.18

7:00 – 5:00 ASRC MKT

  • The ONR proposal is in!
  • Promoted the Odyssey thoughts to Phlog
  • More BIC
    • The problem posed by Heads and Tails is not that the players lack a common understanding of salience; it is that game theory lacks an adequate explanation of how salience affects the decisions of rational players. All we gain by adding preplay communication to the model is the realisation that game theory also lacks an adequate explanation of how costless messages affect the decisions of rational players. (pg 180)
  • More TF crash course
    • Invert the ratio for train and validation
    • Add the check against test data
  • Get started on LSTM w/Aaron?

     

Phil 3.21.18

7:00 – 6:00 ASRC MKT, with some breaks for shovelling

  • First day of spring. Snow on the ground and more in the forecast.
  • I’ve been thinking of ways to describe the differences between information visualizations with respect to maps. Here’s The Odyssey as a geographic map:
  • Odysseus'_Journey
  • The first thing that I notice is just how far Odysseus travelled. That’s about half of the Mediterranean! I thought that it all happened close to Greece. Maps afford this understanding. They are diagrams that support the plotting of trajectories.Which brings me to the point that we lose a lot of information about relationships in narratives. That’s not their point. This doesn’t mean that non-map diagrams don’t help sometimes. Here’s a chart of the characters and their relationships in the Odyssey:
  •  odyssey
  • There is a lot of information here that is helpful. And this I do remember and understood from reading the book. Stories are good about depicting how people interact. But though this chart shows relationships, the layout does not really support navigation. For example, the gods are all related by blood and can pretty much contact each other at will. This chart would have Poseidon accessing Aeolus and  Circe by going through Odysseus.  So this chart is not a map.
  • Lastly, is the relationship that comes at us through search. Because the implicit geographic information about the Odyssey is not specifically in the text, a search request within the corpora cannot produce a result that lets us integrate it
  • OdysseySearchJourney
  • There is a lot of ambiguity in this result, which is similar to other searches that I tried which included travel, sail and other descriptive terms. This doesn’t mean that it’s bad, it just shows how search does not handle context well. It’s not designed to. It’s designed around precision and recall. Context requires a deeper understanding about meaning, and even such recent innovations such as sharded views with cards, single answers, and pro/con results only skim the surface of providing situationally appropriate, meaningful context.
  • Ok, back to tensorflow. Need to update my computer first….
    • Updating python to 64-bit – done
    • Installing Visual Studio – sloooooooooooooooooooooowwwwwwwwwwwww. Done
    • Updating graphics drivers – done
    • Updating tensorflow
    • Updating numpy with intel math
  • At the Validation section in the TF crash course. Good progress. drilling down into all the parts of python that I’ve forgotten. And I got to make a pretty picture: TF_crash_course1

Phil 3.20.18

7:00 – 3:00 ASRC MKT

  • What (satirical) denying a map looks like. Nice application of believability.
  • Need to make a folder with all the CUDA bits and Visual Studio to get all my boxes working with GPU tensorflow
  • Assemble one-page resume for ONR proposal
  • More BIC
    • The fundamental principle of this morality is that what each agent ought to do is to co-operate, with whoever else is co-operating, in the production of the best consequences possible given the behaviour of non-co-operators’ (Regan 1980, p. 124). (pg 167)
    • Ordered On Social Facts
      • Are social groups real in any sense that is independent of the thoughts, actions, and beliefs of the individuals making up the group? Using methods of philosophy to examine such longstanding sociological questions, Margaret Gilbert gives a general characterization of the core phenomena at issue in the domain of human social life.

Back to the TF crash course

    • Had to update my numpy from Christoph Gohlke’s Unofficial Windows Binaries for Python Extension Packages. It’s wonderful, but WHY???
    • Also had this problem updating numpy
      D:\installed>pip3 install "numpy-1.14.2+mkl-cp37-cp37m-win_amd64.whl"
      numpy-1.14.2+mkl-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
    • That was solved by installing numpy-1.14.2+mkl-cp36-cp36m-win_amd64.whl. Why cp36 works and cp 37 doesn’t is beyond me.
    • Discussions with Aaron about tasks between now and the TFDS
    • Left early due to snow

 

Phil 3.19.18

7:00 – 5:00 ASRC MKT

    • The Perfect Selfishness of Mapping Apps
      • Apps like Waze, Google Maps, and Apple Maps may make traffic conditions worse in some areas, new research suggests.
    • Cambridge Social Decision-Making Lab
    • More BIC
      • Schema 3: Team reasoning (from a group viewpoint) pg 153
        • We are the members of S.
        • Each of us identifies with S.
        • Each of us wants the value of U to be maximized.
        • A uniquely maximizes U.
        • Each of us should choose her component of A.
      • Schema 4: Team reasoning (from an individual viewpoint) pg 159
        • I am a member of S.
        • It is common knowledge in S that each member of S identifies
          with S.
        • It is common knowledge in S that each member of S wants the
          value of U to be maximized.
        • It is common knowledge in S that A uniquely maximizes U.
        • I should choose my component of A.
      • Schema 7: Basic team reasoning pg 161
        • I am a member of S.
        • It is common knowledge in S that each member of S identifies
          with S.
        • It is common knowledge in S that each member of S wants the
          value of U to be maximized.
        • It is common knowledge in S that each member of S knows his
          component of the profile that uniquely maximizes U.
        • I should choose my component of the profile that uniquely
          maximizes U.

          • Bacharach notes to himself the ‘hunch’ that this schema is ‘the basic rational capacity’ which leads to high in Hi-Lo, and that it ‘seems to be indispensable if a group is ever to choose the best plan in the most ordinary organizational circumstances’. Notice that Schema 7 does not require that the individual who uses it know everyone’s component of the profile that maximizes U.
      • His hypothesis is that group identification is an individual’s psychological response to the stimulus of a particular decision situation. It is not in itself a group action. (To treat it as a group action would, in Bacharach’ s framework, lead to an infinite regress.) In the theory of circumspect team reasoning, the parameter w is interpreted as a property of a psychological mechanism-the probability that a person who confronts the relevant stimulus will respond by framing the situation as a problem ‘for us’. The idea is that, in coming to frame the situation as a problem ‘for us’, an individual also gains some sense of how likely it is that another individual would frame it in the same way; in this way, the value of w becomes common knowledge among those who use this frame. (Compare the case of the large cube in the game of Large and Small Cubes, discussed in section 4 of the introduction.) Given this model, it seems that the ‘us’ in terms of which the problem is framed must be determined by how the decision situation first appears to each individual. Thus, except in the special case in which w == 1, we must distinguish S (the group with which individuals are liable to identify, given the nature of the decision situation) from T (the set of individuals who in fact identify with S). pg 163
    • Starting with the updates
      C:\WINDOWS\system32>pip3 install --upgrade tensorflow-gpu
      Collecting tensorflow-gpu
        Downloading tensorflow_gpu-1.6.0-cp36-cp36m-win_amd64.whl (85.9MB)
          100% |████████████████████████████████| 85.9MB 17kB/s
      Collecting termcolor>=1.1.0 (from tensorflow-gpu)
        Downloading termcolor-1.1.0.tar.gz
      Collecting absl-py>=0.1.6 (from tensorflow-gpu)
        Downloading absl-py-0.1.11.tar.gz (80kB)
          100% |████████████████████████████████| 81kB 6.1MB/s
      Collecting grpcio>=1.8.6 (from tensorflow-gpu)
        Downloading grpcio-1.10.0-cp36-cp36m-win_amd64.whl (1.3MB)
          100% |████████████████████████████████| 1.3MB 1.1MB/s
      Collecting numpy>=1.13.3 (from tensorflow-gpu)
        Downloading numpy-1.14.2-cp36-none-win_amd64.whl (13.4MB)
          100% |████████████████████████████████| 13.4MB 121kB/s
      Collecting astor>=0.6.0 (from tensorflow-gpu)
        Downloading astor-0.6.2-py2.py3-none-any.whl
      Requirement already up-to-date: six>=1.10.0 in c:\program files\python36\lib\site-packages (from tensorflow-gpu)
      Collecting tensorboard<1.7.0,>=1.6.0 (from tensorflow-gpu)
        Downloading tensorboard-1.6.0-py3-none-any.whl (3.0MB)
          100% |████████████████████████████████| 3.1MB 503kB/s
      Collecting protobuf>=3.4.0 (from tensorflow-gpu)
        Downloading protobuf-3.5.2.post1-cp36-cp36m-win_amd64.whl (958kB)
          100% |████████████████████████████████| 962kB 1.3MB/s
      Collecting gast>=0.2.0 (from tensorflow-gpu)
        Downloading gast-0.2.0.tar.gz
      Requirement already up-to-date: wheel>=0.26 in c:\program files\python36\lib\site-packages (from tensorflow-gpu)
      Requirement already up-to-date: html5lib==0.9999999 in c:\program files\python36\lib\site-packages (from tensorboard<1.7.0,>=1.6.0->tensorflow-gpu)
      Requirement already up-to-date: bleach==1.5.0 in c:\program files\python36\lib\site-packages (from tensorboard<1.7.0,>=1.6.0->tensorflow-gpu)
      Requirement already up-to-date: markdown>=2.6.8 in c:\program files\python36\lib\site-packages (from tensorboard<1.7.0,>=1.6.0->tensorflow-gpu)
      Requirement already up-to-date: werkzeug>=0.11.10 in c:\program files\python36\lib\site-packages (from tensorboard<1.7.0,>=1.6.0->tensorflow-gpu)
      Collecting setuptools (from protobuf>=3.4.0->tensorflow-gpu)
        Downloading setuptools-39.0.1-py2.py3-none-any.whl (569kB)
          100% |████████████████████████████████| 573kB 2.3MB/s
      Building wheels for collected packages: termcolor, absl-py, gast
        Running setup.py bdist_wheel for termcolor ... done
        Stored in directory: C:\Users\philip.feldman\AppData\Local\pip\Cache\wheels\de\f7\bf\1bcac7bf30549e6a4957382e2ecab04c88e513117207067b03
        Running setup.py bdist_wheel for absl-py ... done
        Stored in directory: C:\Users\philip.feldman\AppData\Local\pip\Cache\wheels\3c\0f\0a\6c94612a8c26070755559045612ca3645fea91c11f2148363e
        Running setup.py bdist_wheel for gast ... done
        Stored in directory: C:\Users\philip.feldman\AppData\Local\pip\Cache\wheels\8e\fa\d6\77dd17d18ea23fd7b860e02623d27c1be451521af40dd4a13e
      Successfully built termcolor absl-py gast
      Installing collected packages: termcolor, absl-py, setuptools, protobuf, grpcio, numpy, astor, tensorboard, gast, tensorflow-gpu
        Found existing installation: setuptools 38.4.0
          Uninstalling setuptools-38.4.0:
            Successfully uninstalled setuptools-38.4.0
        Found existing installation: protobuf 3.5.1
          Uninstalling protobuf-3.5.1:
            Successfully uninstalled protobuf-3.5.1
        Found existing installation: numpy 1.13.0+mkl
          Uninstalling numpy-1.13.0+mkl:
            Successfully uninstalled numpy-1.13.0+mkl
        Found existing installation: tensorflow-gpu 1.4.0
          Uninstalling tensorflow-gpu-1.4.0:
            Successfully uninstalled tensorflow-gpu-1.4.0
      Successfully installed absl-py-0.1.11 astor-0.6.2 gast-0.2.0 grpcio-1.10.0 numpy-1.14.2 protobuf-3.5.2.post1 setuptools-39.0.1 tensorboard-1.6.0 tensorflow-gpu-1.6.0 termcolor-1.1.0
    • That caused the following items to break when I tried running “fully_connected.py”
      "C:\Program Files\Python36\python.exe" D:/Development/Sandboxes/TensorflowPlayground/HelloPackage/fully_connected_feed.py
      Traceback (most recent call last):
        File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
          ctypes.WinDLL(build_info.cudart_dll_name)
        File "C:\Program Files\Python36\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 "D:/Development/Sandboxes/TensorflowPlayground/HelloPackage/fully_connected_feed.py", line 28, in 
          import tensorflow as tf
        File "C:\Program Files\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in 
          from tensorflow.python import *
        File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in 
          from tensorflow.python import pywrap_tensorflow
        File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in 
          self_check.preload_check()
        File "C:\Program Files\Python36\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_90.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL: https://developer.nvidia.com/cuda-toolkit
    • Installing Visual Studio for the DLLs before I install the Cuda parts
    • Downloading cuda_9.0.176_win10.exe from here There are also two patches
    • Next set of errors
      Traceback (most recent call last):
        File "D:/Development/Sandboxes/TensorflowPlayground/HelloPackage/fully_connected_feed.py", line 28, in 
          import tensorflow as tf
        File "C:\Program Files\Python36\lib\site-packages\tensorflow\__init__.py", line 24, in 
          from tensorflow.python import *
        File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\__init__.py", line 49, in 
          from tensorflow.python import pywrap_tensorflow
        File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in 
          self_check.preload_check()
        File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\platform\self_check.py", line 97, in preload_check
          % (build_info.cudnn_dll_name, build_info.cudnn_version_number))
      ImportError: Could not find 'cudnn64_7.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Note that installing cuDNN is a separate step from installing CUDA, and this DLL is often found in a different directory from the CUDA DLLs. You may install the necessary DLL by downloading cuDNN 7 from this URL: https://developer.nvidia.com/cudnn
      
  • Looking for cudnn64_7.dll here?
  • Aaaand that seems to be working!
  • Tweaked ONR proposal with Aaron. Discovered that there is one page per PI, so we need to make one-page resumes.

 

 

Phil 3.15.18

8:30 – 4:30 ASRC MKT

Phil 3.14.18

7:00 – 4:00 ASRC MKT

  • Cannot log into my timesheet
  • Continuing along with TF. Got past the introductions and to the beginning of the coding.
  • Myanmar: UN blames Facebook for spreading hatred of Rohingya (The Guardia)
    • ‘Facebook has now turned into a beast’, says United Nations investigator, calling network a vehicle for ‘acrimony, dissension and conflict’
  • Related to the above (which was pointed out by the author in this tweet)
  • Keynote: Susan Dumais
    • Better Together: An Interdisciplinary Perspective on Information Retreival
    • A solution to plato’s problem – latent semantic indexing
    • The road to LSI
    • LSI paper as dimension reduction Dumas et al 1988,
    • Search and context
      • Ranked list of 10 blue links
      • Need to understand the context in which they occur. Documents are intricately linked
      • Search is doe to accomplish something (picture of 2 people pointing at a chart/map?)
      • Short and long term models of interest (Bennett et al 2012)
      • Stuff I’ve Seen (2003) Becomes LifeBrowser
    • Future directions
      • ML will take over IR for better or worst
      • Moving from a world that indexe strings to a world that indexes things
      • Bing is doing pro/con with questions, state maintained dialog
  • Here and Now: Reality-Based Information Retrieval. [Perspective Paper]
    Wolfgang Büschel, Annett Mitschick and Raimund Dachselt

    • Perspective presentation on AR-style information retreival.
    • Maybe an virtual butler that behaves like an invisible freind?
  • A Study of Immediate Requery Behavior in Search.
    Haotian Zhang, Mustafa Abualsaud and Mark Smucker
  • Exploring Document Retrieval Features Associated with Improved Short- and Long-term Vocabulary Learning Outcomes.
    Rohail Syed and Kevyn Collins-Thompson
  • Switching Languages in Online Searching: A Qualitative Study of Web Users’ Code-Switching Search Behaviors.
    Jieyu Wang and Anita Komlodi
  • A Comparative User Study of Interactive Multilingual Search Interfaces.
    Chenjun Ling, Ben Steichen and Alexander Choulos