Class cc.view
- Defined in: CCEGLView.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
cc.view()
cc.view is the singleton object which represents the game window.
|
Method Summary
Class Detail
cc.view()
cc.view is the singleton object which represents the game window.
It's main task include:
- Apply the design resolution policy
- Provide interaction with the window, like resize event on web, retina display support, etc...
- Manage the game view port which can be different with the window
- Manage the content scale and translation
Since the cc.view is a singleton, you don't need to call any constructor or create functions,
the standard way to use it is by calling:
- cc.view.methodName();
It's main task include:
- Apply the design resolution policy
- Provide interaction with the window, like resize event on web, retina display support, etc...
- Manage the game view port which can be different with the window
- Manage the content scale and translation
Since the cc.view is a singleton, you don't need to call any constructor or create functions,
the standard way to use it is by calling:
- cc.view.methodName();
Method Detail
-
adjustViewPort(enabled)Sets whether the engine modify the "viewport" meta in your web page.
It's enabled by default, we strongly suggest you not to disable it.
And even when it's enabled, you can still set your own "viewport" meta, it won't be overridden
Only useful on web- Parameters:
- {Boolean} enabled
- Enable automatic modification to "viewport" meta
-
{Boolean} canSetContentScaleFactor()Returns whether developer can set content's scale factor.
- Returns:
- {Boolean}
-
centerWindow()Empty function
-
{cc.Point} convertToLocationInView(tx, ty, relatedPos)Returns the real location in view for a translation based on a related position
- Parameters:
- {Number} tx
- The X axis translation
- {Number} ty
- The Y axis translation
- {Object} relatedPos
- The related position object including "left", "top", "width", "height" informations
- Returns:
- {cc.Point}
-
ctor()Constructor of cc.EGLView
-
enableAutoFullScreen(enabled)If enabled, the application will try automatically to enter full screen mode on mobile devices
You can pass true as parameter to enable it and disable it by passing false.
Only useful on web- Parameters:
- {Boolean} enabled
- Enable or disable auto full screen on mobile devices
-
enableRetina(enabled)Retina support is enabled by default for Apple device but disabled for other devices,
it takes effect only when you called setDesignResolutionPolicy
Only useful on web- Parameters:
- {Boolean} enabled
- Enable or disable retina display
-
end()Force destroying EGL view, subclass must implement this method.
-
{cc.Size|Object} getContentTranslateLeftTop()Returns the resolution translate on EGLView
- Returns:
- {cc.Size|Object}
-
{cc.Size} getDesignResolutionSize()Returns the designed size for the view. Default resolution size is the same as 'getFrameSize'.
- Returns:
- {cc.Size}
-
{Number} getDevicePixelRatio()Returns device pixel ratio for retina display.
- Returns:
- {Number}
-
{cc.Size} getFrameSize()Returns the frame size of the view.
On native platforms, it returns the screen size since the view is a fullscreen view.
On web, it returns the size of the canvas's outer DOM element.- Returns:
- {cc.Size}
-
{cc.ResolutionPolicy} getResolutionPolicy()Returns the current resolution policy
- Returns:
- {cc.ResolutionPolicy}
- See:
- cc.ResolutionPolicy
-
{Number} getScaleX()Returns scale factor of the horizontal direction (X axis).
- Returns:
- {Number}
-
{Number} getScaleY()Returns scale factor of the vertical direction (Y axis).
- Returns:
- {Number}
-
{cc.Rect} getScissorRect()Returns the current scissor rectangle
- Returns:
- {cc.Rect}
-
{String} getTargetDensityDPI()Returns the current target-densitydpi value of cc.view.
- Returns:
- {String}
-
{String} getViewName()Returns the name of the view
- Returns:
- {String}
-
{cc.Rect} getViewPortRect()Returns the view port rectangle.
- Returns:
- {cc.Rect}
-
{cc.Point} getVisibleOrigin()Returns the visible origin of the view port.
- Returns:
- {cc.Point}
-
{cc.Size} getVisibleSize()Returns the visible area size of the view port.
- Returns:
- {cc.Size}
-
{Boolean} isAutoFullScreenEnabled()Check whether auto full screen is enabled.
Only useful on web- Returns:
- {Boolean} Auto full screen enabled or not
-
{Boolean} isOpenGLReady()Get whether render system is ready(no matter opengl or canvas),
this name is for the compatibility with cocos2d-x, subclass must implement this method.- Returns:
- {Boolean}
-
{Boolean} isRetinaEnabled()Check whether retina display is enabled.
Only useful on web- Returns:
- {Boolean}
-
{Boolean} isScissorEnabled()Returns whether GL_SCISSOR_TEST is enable
- Returns:
- {Boolean}
-
resizeWithBrowserSize(enabled)Sets whether resize canvas automatically when browser's size changed.
Useful only on web.- Parameters:
- {Boolean} enabled
- Whether enable automatic resize with browser's resize event
-
setContentTranslateLeftTop(offsetLeft, offsetTop)Sets the resolution translate on EGLView
- Parameters:
- {Number} offsetLeft
- {Number} offsetTop
-
setDesignResolutionSize(width, height, resolutionPolicy)Sets the resolution policy with designed view size in points.
The resolution policy include:
[1] ResolutionExactFit Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched.
[2] ResolutionNoBorder Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut.
[3] ResolutionShowAll Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown.
[4] ResolutionFixedHeight Scale the content's height to screen's height and proportionally scale its width
[5] ResolutionFixedWidth Scale the content's width to screen's width and proportionally scale its height
[cc.ResolutionPolicy] [Web only feature] Custom resolution policy, constructed by cc.ResolutionPolicy
- Parameters:
- {Number} width
- Design resolution width.
- {Number} height
- Design resolution height.
- {cc.ResolutionPolicy|Number} resolutionPolicy
- The resolution policy desired
-
setFrameSize(width, height)On native, it sets the frame size of view.
On web, it sets the size of the canvas's outer DOM element.- Parameters:
- {Number} width
- {Number} height
-
setIMEKeyboardState(isOpen)Open or close IME keyboard , subclass must implement this method.
- Parameters:
- {Boolean} isOpen
-
setResizeCallback(callback)Sets the callback function for cc.view's resize action,
this callback will be invoked before applying resolution policy,
so you can do any additional modifications within the callback.
Useful only on web.- Parameters:
- {Function|null} callback
- The callback function
-
setResolutionPolicy(resolutionPolicy)Sets the current resolution policy
- Parameters:
- {cc.ResolutionPolicy|Number} resolutionPolicy
- See:
- cc.ResolutionPolicy
-
setScissorInPoints(x, y, w, h)Sets Scissor rectangle with points.
- Parameters:
- {Number} x
- {Number} y
- {Number} w
- {Number} h
-
setTargetDensityDPI(densityDPI)
Sets view's target-densitydpi for android mobile browser. it can be set to:
1. cc.DENSITYDPI_DEVICE, value is "device-dpi"
2. cc.DENSITYDPI_HIGH, value is "high-dpi" (default value)
3. cc.DENSITYDPI_MEDIUM, value is "medium-dpi" (browser's default value)
4. cc.DENSITYDPI_LOW, value is "low-dpi"
5. Custom value, e.g: "480"
- Parameters:
- {String} densityDPI
-
setViewName(viewName)Sets the name of the view
- Parameters:
- {String} viewName
-
setViewPortInPoints(x, y, w, h)Sets view port rectangle with points.
- Parameters:
- {Number} x
- {Number} y
- {Number} w
- width
- {Number} h
- height
-
swapBuffers()Exchanges the front and back buffers, subclass must implement this method.


Reinforcement Learning
The purpose of this exercise is to implement an agent using reinforcement learning that can play a simple game to rescue humans from a building that has been flooded with radiation.
Reinforcement learning is a technique of using trial-and-error episodes to learn how to play a game as close to optimally as possible. By using reinforcement learning in a game, we are trying to play as well as (or better) than humans. Variants of reinforcement learning have been used to play Backgammon, Go, and other board games at skill levels superior to humans. Reinforcement learning has been used to train agents to play Atari games at (sometimes better) human skill levels.
Our agent will learn to play a simple game called "radiation world" which was originally designed for rescue scenarios. In radiation world, humans have been trapped in a building because of a radiation leak. There are areas that are irradiated that humans cannot safely move through. However a robot can move safely through them. Your robot must navigate the building to reach each human.
The following is an example game map. Black indicates walls. Red indicates areas with radiation. Blue indicates grid cells containing humans. Green is the base station for the robot.
The agent can move left, right, up, or down. If it enters a grid cell with a human, then that human is saved.
One last thing: there is an enemy robot roaming around the building that will try to hurt the agent if they are ever in the same location for more than one turn. Our agent has one additional action, "smash," which can destroy the enemy robot.
The goal of a reinforcement learning agent is to get as many points as it can during a game. Thus, the definition of optimal behavior depends on how score is computed. The default way score is computed is as follows:
- 20 points per turn for each human rescued
- 10 points for being at the base station
- -50 points for being hurt by the enemy robot
- -20 points for being in radiation
- -10 points per turn that the enemy robot is no longer functional
- -1 point per turn that the agent is not at the base or in radiation
(Yes, you lose points if you kill the enemy robot, so with this scoring function the bot will need to learn to avoid it instead.)
You will implement the Q-learning algorithm and test your agent in the radiation world.
What you need to know
Below are the important bits of information about objects that you will be working with or need to know about for this assignment.
Environment
The Environment describes how the simulated world works and also how reward (score) is defined.
Member variables:
- map: Gives the physical environment as a 2D array. map[y][x] gives the (x, y) position.
- 1 = walls
- 2 = radiation
- 4 = goal (non-terminal), a place that reward can be gained over and over again (not used)
- 10 = goal (terminal), a place that reward can be gained once and the game ends (not used)
- 5-9 = unique identifiers for people to be rescued
- width: the width of the map
- height: the height of the map
- influenceMap: tells the enemy agent how to move around the environment so that it doesn't run into walls. Each cell in the 2D array indicates the direction the enemy should move.
- currentState: the state of the world. The state is an array where each index indicates a different feature of the world
- index 0: the bot's x location
- index 1: the bot's y location
- index 2: a boolean indicating whether the enemy is alive or not
- index 3: the enemy's x location
- index 4: the enemy's y location
- index 5: a boolean indicating whether the enemy is torturing the bot
- indices 6-9: a boolean indicating whether the person with that unique identifier has been rescued (True = rescued)
- previousState: the previous state of the world
- startState: the default start state (unless a random start state is generated)
- reward: the amount of points obtained at a goal.
- rescue: the amount of points obtained for each survior rescued.
- penalty: the amount of points for not being in a goal position.
- pain: the amount of points for being hurt by the enemy.
- radiation: the amount of points for being in a radiation cell.
- dead: the amount of points if the enemy is dead.
- counter: keeps tracks of the number of turns.
- moveTimer: how often the enemy can move.
- enemyMode: Indicates how the enemy moves:
- 0 = enemy doesn't move
- 1 = enemy moves according to the influenceMap
- 2 = enemy moves randomly
- 3 = enemy chases the bot
- 4 = enemy gets instructions from an external source
- nextEnemyMove: indicates which direction the enemy should move if enemyMode = 4.
- randomStart: should a random start state be used?
- lastActionValue: the last action the bot performed.
- verbose: How much logging information to print. Don't refer to verbose directly, but use isVerbose()
- 0 or False= none
- 1 = print state tuple
- 2 = print map
Member functions:
- validActions(): Return a list of valid actions: [0, 1, 2, 3, 4]
- 0 = up
- 1 = down
- 2 = left
- 3 = right
- 4 = smash (bot only)
- actionToString(act): return the string name for an action.
- env_start(): Starts the simulation
- env_step(thisAction): Update the world based on the given action to be performed by the agent. This function also computes and executes the action the enemy agent performs (if any). The current state is updated by side effect. The function returns the next observation (state) and the immediate reward obtained.
- end_reset(): start the simulation over again.
- checkTerminal(): determines whether the current state is a terminal state.
- executeAction(theAction): updates the current state based on the effects of the given action. You probably shouldn't call this directly and use env_step() instead.
- calculateReward(theAction): looks at the current state and the action passed in (which should be the action just executed by the bot) and returns the amount of immediate reward.
- printEnvironment(): print the world state in human-readable form.
- isVerbose(): use this to check the verbose variable because it handles False and numbers.
Action
A container class for passing action information around. The member, actionValue, contains a numerical value referring to the action.
Observation
A container class for passing observation (state) information around. The member, worldState, contains the state tuple. Other member variables are not used.
Reward
A container class for passing reward information around. The member, rewardValue, contains the reward information as a floating-point value.
Agent
The agent class controls the bot and implements the Q-learning algorithm.
Member variables:
- lastAction: the last action performed.
- lastObservation: the last observation (state) received.
- epsilon: how often to use the policy to act versus taking a random action.
- gamma: the discount factor
- learningRate: the learning rate
- v_table: the value table, a 2D array where each row is a possible state and each column is a possible action. Implemented as a dictionary where key is state and values are arrays of values where the kth value in the array is for the kth action in Environment.validActions()
- gridEnvironment: a pointer to an Environment object
- initialObs: the initial state
- currentObs: the current state
- numSteps: how many actions should the agent take before quitting.
- totalReward: total reward received.
- verbose: amount of logging to print. Use isVerbose() to query the variable.
- 0 or False = none
- 1 or True = do logging
- numActions: the number of possible actions in the environment
Member functions:
- initializeVtableStateEntry(state): for a state, make sure there is a corresponding row in the v_table, initialized to 0.0 for all actions.
- executePolicy(observation): Given an initial observation (state), execute the policy (v_table).
- qLearn(observation): Given an initial observation (state), run the agent for numSteps time steps and update the v_table according to the Q-learning algorithm.
- updateVtable(newState, lastState, newAction, lastAction, reward, terminal, availableActions): Used by qLearn() to update the v_table. Everything needed to perform that operation is provided as arguments. The v_table is updated as a side-effect. No return value. Must be completed by the student.
- newState: the state encountered after executing newAction
- lastState: the state the agent just left when executing newAction
- newAction: the action the agent just performed
- lastAction: the last action the agent performed
- reward: the amount of immediate reward received for performing newAction
- terminal: boolean, did the agent just hit a terminal state?
- availableActions: what actions can be performed in this new state?
- eGreedy(observation): Pick a random action epsilon percent of the time, or pick the greedy action otherwise. Return the action picked. To be completed.
- greedy(observation): Pick and return the best action according to the v_table. To be completed.
- agent_reset(): restart the agent and the environment.
- copyObservation(obs): make a new data structure in memory with the same information as the old observation.
- calculateFlatState(theState): make sure the state is a tuple.
- isVerbose(): determine how much logging to print. Use this instead of querying verbose directly.
Controller
This is a file that contains code to launch the game, train the agent, and test the agent. The code first trains the agent over a number of episodes. After each episode it tests the policy and reports the progress. After training is complete, the environment is reset it runs the agent for a number of steps, printing out the results of each step. Finally, optionally, the human can play the game as the bot or as the enemy robot.
Parameters:
- episodes: number of episodes to train the agent.
- trainingReportRate: how many episodes pass before printing out a report during training
- play: Set to run in interactive mode:
- 0 = no interactive mode
- 1 = play as the bot
- 2 = play as the enemy
Other things you may want to experiment with:
- gridEnvironment.enemyMode
- gridEnvironment.verbose
- gridEnvironment.randomStart
- gridAgent.verbose
- gridAgent.numSteps
Instructions
ExecutePolicy() and part of qLearn() have already been provided. You must complete the implementation of the Q-learning algorithm.
Step 1: Implement greedy(). Test it by using testgreedy.py.
(testgreedy.py doesn't verify the correctness of your implementation but gives a framework for easily inspecting a value table and visually verifying that greedy() is returning the correct result).
Step 2: Implement egreedy(). Test it by using testegreedy.py.
(testegreedy.py works similarly to testgreedy.py except one must vary the epsilon value and verify the results by hand).
Step 3: Implement updateVtable(). Test it using testvtable.py.
(testvtable.py doesn't verify the correctness of your implementation but gives a framework for easily inspecting a value table after executing a sequence of actions.)
Step 4: Test your complete implementation:
Additional testing can be done by making your own maps.
Step 5: Write a report answering the following questions.
- Why doesn't the bot avoid the radiation in the default map? What would have to be different for the bot to avoid as much of it as possible?
- Under the default reward, the bot runs away from the enemy. What is the smallest value for enemyDead that would make it so that the bot is willing to kill the enemy if they cross paths? Explain why. What is the smallest value for enemyDead that would induce the bot to seek out the enemy and kill it? Explain why.
- What effect does switching enemyMode from 1 (follow the influence map) to 2 during training have on the behavior of the bot, if any? How does more or fewer training episodes help or hurt? Hint: experiment with play = 2.
Grading
This homework assignment is worth 10 points. Your solution will be graded by autograder. The autograder will independently test your greedy(), egreedy(), and updateVtable() implementations.
- 2 points: correct implementation of greedy()
- 5 points: correct implementation of updateVtable() and eGreedy().
- 2 points for updating the Q values for an arbitrary execution sequence;
- 1 point for a Q-table that produces the correct execution sequence;
- 2 points for computing correct Q values after training.
- 3 points: report
Submission
To submit your solution, upload your modified Agent.py and your report.
You may modify Controller.py and Environment.py for testing, but do not submit your changes to these files. The grader will use its own version of Controller.py and Environment.py.
DO NOT upload the entire directory.


The Dark Secrets of BERT
07 Jan 2020 • 15 minsTags:
This blog post summarizes our EMNLP 2019 paper “Revealing the Dark Secrets of BERT” (Kovaleva, Romanov, Rogers, & Rumshisky, 2019). Paper PDF: https://www.aclweb.org/anthology/D19-1445.pdf
2019 could be called the year of the Transformer in NLP: this architecture dominated the leaderboards and inspired many analysis studies. The most popular Transformer is, undoubtedly, BERT (Devlin, Chang, Lee, & Toutanova, 2019). In addition to its numerous applications, multiple studies probed this model for various kinds of linguistic knowledge, typically to conclude that such knowledge is indeed present, to at least some extent (Goldberg, 2019; Hewitt & Manning, 2019; Ettinger, 2019).
This work focuses on the complementary question: what happens in the fine-tuned BERT? In particular, how much of the linguistically interpretable self-attention patterns that are presumed to be its strength are actually used to solve downstream tasks?
To answer this question, we experiment with BERT fine-tuned on the following GLUE (Wang et al., 2018) tasks and datasets:
- paraphrase detection (MRPC and QQP);
- textual similarity (STS-B);
- sentiment analysis (SST-2);
- textual entailment (RTE);
- natural language inference (QNLI, MNLI).
A brief intro to BERT
BERT stands for Bidirectional Encoder Representations from Transformers. This model is basically a multi-layer bidirectional Transformer encoder (Devlin, Chang, Lee, & Toutanova, 2019), and there are multiple excellent guides about how it works generally, including the Illustrated Transformer. What we focus on is one specific component of Transformer architecture known as self-attention. In a nutshell, it is a way to weigh the components of the input and output sequences so as to model relations between them, even long-distance dependencies.
As a brief example, let’s say we need to create a representation of the sentence “Tom is a black cat”. BERT may choose to pay more attention to “Tom” while encoding the word “cat”, and less attention to the words “is”, “a”, “black”. This could be represented as a vector of weights (for each word in the sentence). Such vectors are computed when the model encodes each word in the sequence, yielding a square matrix which we refer to as the self-attention map.
Now, a priori it is not clear that the relation between “Tom” and “cat” is always the best one. To answer questions about the color of the cat, a model would do better to focus on “black” rather than “Tom”. Luckily, it doesn’t have to choose. The power of BERT (and other Transformers) is largely attributed to the fact that there are multiple heads in multiple layers that all learn to construct independent self-attention maps. Theoretically, this could give the model the capacity to “attend to information from different representation subspaces at different positions” (Vaswani et al., 2017). In other words, the model would be able to choose between several alternative representations for the task at hand.
Most of the computation of self-attention weights happens in BERT during pre-training: the model is (pre-)trained on two tasks (masked language model and next sentence prediction), and subsequently fine-tuned for individual downstream tasks such as sentiment analysis. The basic idea for this separation of the training process into semi-supervised pre-training and supervised fine-tuning phases is that of transfer learning: the task datasets are typically too small to learn enough about language in general, but large text corpora can be used for this via the language modeling objective (and other similar ones). We could thus get task-independent, but informative representations of sentences and texts, which then could be “adapted” for the downstream tasks.
Let us note here that the exact way the “adaptation” is supposed to work is not described in detail in either BERT paper or the GPT technical report (which highlighted the pre-training/fine-tuning approach). However, if attention itself is meant to provide a way to “link” parts of the input sequence so as to increase its informativeness, and the multi-head, multi-layer architecture is needed to provide multiple alternative attention maps, presumably the fine-tuning process would teach the model to rely on the maps that are more useful for the task at hand. For instance, one could expect that relations between nouns and adjectives are more important for sentiment analysis task than relations between nouns and prepositions, and so fine-tuning would ideally teach the model to rely more on the more useful self-attention maps.
What types of self-attention patterns are learned, and how many of each type?
So what are the patterns of the self-attention in BERT? We found five, as shown below:
- The vertical pattern indicates attention to a single token, which usually is either the [SEP] token (special token representing the end of a sentence), or [CLS] (special BERT token that is used as full sequence representation fed to the classifiers).
- The diagonal pattern indicates the attention to previous/next words;
- The block pattern indicates more-or-less uniform attention to all tokens in a sequence;
- The heterogeneous pattern is the only pattern that theoretically could correspond to anything like meaningful relations between parts of the input sequence (although not necessarily so).
And here are the ratios of these five types of attention in BERT fine-tuned on seven GLUE tasks (with each column representing 100% of all heads in all layers):
While the exact ratios vary by the task, in most cases the potentially meaningful patterns constitute less than half of all BERT self-attention weights. At least a third of BERT heads attends simply to [SEP] and [CLS] tokens - a strategy that cannot contribute much of meaningful information to the next layer’s representations. It also shows that the model is severely overparametrized, which explains the recent successful attempts of its distillation (Sanh, Debut, Chaumond, & Wolf, 2019; Jiao et al., 2019).
Note that we experimented with BERT-base, the smaller model with 12 heads in 16 layers. If it is already so overparametrized, this has implications for BERT-large and all the later models, some of which are 30 times larger (Wu et al., 2016).
Such reliance on [SEP] and [CLS] tokens could also suggest that either they somehow “absorb” the informative representations obtained in the earlier layers, and subsequent self-attention maps are simply not needed much, or that BERT overall does not rely on self-attention maps to the degree to which one would expect for this key component of this architecture.
What happens in fine-tuning?
Our next question was what actually changes during the fine-tuning of BERT. The heatmap below shows the cosine similarities between flattened self-attention map matrices in each head and each layer, before and after fine-tuning. Darker colors indicate more differences in the representation. For all GLUE tasks the fine-tuning was done for 3 epochs.
We see that most attention weights do not change all that much, and for most tasks, the last two layers show the most change. These changes do not appear to favor any specific types of meaningful attention patterns. Instead, we find that the model basically learns to rely more on the vertical attention pattern. In the SST example below the thicker vertical attention patterns in the last layers are due to the joint attention to the final [SEP] and the punctuation tokens preceding it, which we observed to be another frequent target for the vertical attention pattern.
This has two possible explanations:
- the vertical pattern is somehow sufficient, i.e. the [SEP] token representations somehow absorbed the meaningful attention patterns from previous layers. We did find that the earliest layers attend to [CLS] more, and then [SEP] starts dominating for most tasks (see Fig. 6 in the paper);
- the tasks at hand do not actually require the fine-grained meaningful attention patterns that are supposed to be the main feature of the Transformers.
How much difference does fine-tuning make?
Given the vast discrepancies in the size of the datasets used in pre-training and fine-tuning, and the very different training objectives, it is interesting to investigate how much of a difference fine-tuning actually makes. To the best of our knowledge, this question has not been addressed before.
We conduct three experiments on each of the selected GLUE datasets:
- BERT performance with weights frozen from pre-training and fed to the task-specific classifiers;
- BERT performance with a model randomly initialized from normal distribution, and fine-tuned on task datasets for 3 epoches;
- BERT performance with the official pretrained BERT-base model, fine-tuned on task datasets for 3 epochs.
The results of this experiment were as follows:
| Dataset | Pretrained | Random+finetuned | Pretrained+finetuned | Metric | Dataset size |
|---|---|---|---|---|---|
| MRPC | 31.6 | 68.3 | 82.3 | Acc | 5.8K |
| STS-B | 33.1 | 2.9 | 82.7 | Acc | 8.6K |
| SST-2 | 49.1 | 80.5 | 92 | Acc | 70K |
| QQP | 60.9 | 63.2 | 78.6 | Acc | 400K |
| RTE | 52.7 | 52.7 | 64.6 | Acc | 2.7K |
| QNLI | 52.8 | 49.5 | 84.4 | Acc | 130K |
| MNLI-m | 31.7 | 61.0 | 78.6 | Acc | 440K |
While it is clear that pretraining + fine-tuning setup yields the highest results, the random + fine-tuned BERT is doing disturbingly well on all tasks except textual similarity. Indeed, for sentiment analysis it appears that one could get 80% accuracy with randomly initialized and fine-tuned BERT, without any pre-training. Given the scale of the large pre-trained Transformers, this raises serious questions about whether the expensive pre-training yields enough bang for the buck. It also raises serious questions about the NLP datasets that apparently can be solved without much task-independent linguistic knowledge that the pre-training + fine-tuning setup was supposed to deliver.
Update 18.01.2020: Thanks to Sam Bowman for pointing out that the random BERT results are overall comparable with pre-Transformer GLUE baselines, and are best interpreted as a reminder of the degree to which these tasks are solvable without deep linguistic knowledge. NLP community needs much more work on harder datasets that actually require such knowledge, and in the interim we should at least switch to SuperGLUE.
Note that GLUE baselines and most published results on these tasks use word embeddings or count-based word vectors as inputs, while our random BERT was fully random. Thus direct comparison is not entirely fair. However, for SST in particular such comparison can be made with the original Recursive Neural Tensor Network (Socher et al., 2013). This 2013 model is tiny in comparison and also takes random vectors as input representations, but it beats our random+fine-tuned BERT by 7 points on binary classification.
Are there any linguistically interpretable self-attention heads?
Several studies at this point tried to locate self-attention heads that encode specific types of information, but most of them focused on syntax. We conducted an experiment focusing on frame semantic elements: we extracted from FrameNet 1.7 (Baker, Fillmore, & Lowe, 1998) 473 sentences which were at most 12 tokens in length (to reduce the number of sentences evoking multiple frames), and which had a core frame element at a distance of at least 2 tokens from the target word (irrespective of its syntactic function). In the example below, it is the relation between the Experiencer and the participle “agitated” that evokes the Emotion_directed frame. Arguably, such relations are indeed core to understanding the situation described by a given sentence, and any mechanism claiming to provide linguistically informative self-attention maps should reflect them (possibly among many other relations).
We obtained representations of these sentences by pre-trained BERT, calculating the maximum weights between token pairs corresponding to the annotated frame semantic relations. Fig. 5 represents the averages of these scores for all examples in our FrameNet dataset. We found two heads (head 2 in layer 1, head 6 in layer 7) that attended to these frame semantic relations more than the other heads.
But… what information actually gets used at inference time?
We believe it would be too rash to conclude from probes of pre-trained BERT weights that certain information is actually encoded. Given the size of the model, it might be possible to find similar proof of encoding for any other relation (and the fact that Jawahar et al. found no significant difference between different decomposition schemes points in that direction (Jawahar, Sagot, & Seddah, 2019)). The real question is whether the model learns to actually rely on that information at inference time.
To see whether the two heads we identified as useful for encoding frame semantic relations actually get used by fine-tuned BERT, we performed an ablation study, disabling one head at a time (i.e. replacing the learned attention weights with uniform attention). Fig. 6 shows a heatmap for all GLUE tasks in our sample, with each cell indicating the overall performance when a given head was switched off. It is clear that while the overall pattern varies between tasks, on average we are better off removing a random head - including those that we identified as encoding meaningful information that should be relevant for most tasks. Many of the heads can also be switched off without any effect on performance, again pointing at the fact that even the base BERT is severely overparametrized.
Similar conclusions were reached independently for machine translation task, with zeroing attention weights rather than replacing them with uniform attention (Michel, Levy, & Neubig, 2019). We further show that this observations extends not to just heads, but whole layers: depending on the task, a whole layer may be detrimental to the model performance!
Discussion
Our key contribution is that while most studies of BERT focused on probing the pre-trained model, we raised the question of what happens in fine-tuning, and just how meaningful the representations obtained with the self-attention mechanism are. So far, we were unable to find evidence of linguistically meaningful self-attention maps being crucial for the performance of fine-tuned BERT.
Our results contribute to the ongoing discussion about the properties of Transformer-based models in the following directions:
a) BERT is heavily overparametrized. In our experiments we disabled only one head at a time, and the fact that in most cases the model performance did not suffer suggests that many heads have functional duplicates, i.e. disabling one head would not harm the model because the same information is available elsewhere. This result points at overparametrization and explains the success of the smaller BERTs like AlBERT and TinyBERT.
Such overparametrization means that BERT may have some highly important heads with linguistically meaningful self-attention patterns after all, but to prove that, we would have to try disabling all possible head combinations (which is not feasible). A promising alternative was suggested in a contemporaneous study: (Voita, Talbot, Moiseev, Sennrich, & Titov, 2019) identified the “important” heads of the base Transformer by fine-tuning the model with a regularized objective that had a pruning effect.
b) BERT does not need to be all that smart for these tasks. The fact that BERT can do so well on most GLUE tasks without pre-training suggests that to a large degree they can be solved without much of language knowledge. Instead of verbal reasoning, it may learn to rely on various shortcuts, biases and artifacts in the datasets to arrive at the correct prediction. In that case its self-attention maps do not necessarily have to be meaningful to us. This finding supports the recent discoveries of problems with many current datasets (Gururangan et al., 2018; McCoy, Pavlick, & Linzen, 2019).
An alternative explanation is that BERT’s success is due to black magic something other than self-attention. For instance, the high amount of attention to punctuation after fine-tuning could mean that the model actually learned to rely on some other component, or there is some deep pattern we cannot comprehend. Also, the degree to which attention can be used to explain model predictions in principle is currently being debated (Jain & Wallace, 2019; Serrano & Smith, 2019; Wiegreffe & Pinter, 2019).
References
- Wu, Y., Schuster, M., Chen, Z., Le, Q. V., Norouzi, M., Macherey, W., … Dean, J. (2016). Google’s Neural Machine Translation System: Bridging the Gap between Human and Machine Translation. CoRR, abs/1609.08144. [PDF]
- Wiegreffe, S., & Pinter, Y. (2019). Attention Is Not Not Explanation. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 11–20. https://doi.org/10.18653/v1/D19-1002 [PDF]
- Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., & Bowman, S. R. (2018). GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding. Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, 353–355. Brussels, Belgium: Association for Computational Linguistics. [PDF]
- Voita, E., Talbot, D., Moiseev, F., Sennrich, R., & Titov, I. (2019). Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Pruned. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 5797–5808. https://doi.org/10.18653/v1/P19-1580 [PDF]
- Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., … Polosukhin, I. (2017). Attention Is All You Need. NIPS, 5998–6008. Long Beach, CA, USA. [PDF]
- Socher, R., Perelygin, A., Wu, J., Chuang, J., Manning, C. D., Ng, A., & Potts, C. (2013). Recursive Deep Models for Semantic Compositionality over a Sentiment Treebank. Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, 1631–1642. [PDF]
- Serrano, S., & Smith, N. A. (2019). Is Attention Interpretable? Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 2931–2951. https://doi.org/10.18653/v1/P19-1282 [PDF]
- Sanh, V., Debut, L., Chaumond, J., & Wolf, T. (2019). DistilBERT, a Distilled Version of BERT: Smaller, Faster, Cheaper and Lighter. 5th Workshop on Energy Efficient Machine Learning and Cognitive Computing - NeurIPS 2019. [PDF]
- Michel, P., Levy, O., & Neubig, G. (2019). Are Sixteen Heads Really Better than One? NeurIPS. [PDF]
- McCoy, T., Pavlick, E., & Linzen, T. (2019). Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inference. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 3428–3448. https://doi.org/10.18653/v1/P19-1334 [PDF]
- Kovaleva, O., Romanov, A., Rogers, A., & Rumshisky, A. (2019). Revealing the Dark Secrets of BERT. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 4356–4365. https://doi.org/10.18653/v1/D19-1445 [PDF]
- Jiao, X., Yin, Y., Shang, L., Jiang, X., Chen, X., Li, L., … Liu, Q. (2019). TinyBERT: Distilling BERT for Natural Language Understanding. ArXiv Preprint ArXiv:1909.10351. [PDF]
- Jawahar, G., Sagot, B., & Seddah, D. (2019). What Does BERT Learn about the Structure of Language? ACL 2019, 3651–3657. Florence, Italy. [PDF]
- Jain, S., & Wallace, B. C. (2019). Attention Is Not Explanation. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), 3543–3556. [PDF]
- Hewitt, J., & Manning, C. D. (2019). A Structural Probe for Finding Syntax in Word Representations. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), 4129–4138. [PDF]
- Gururangan, S., Swayamdipta, S., Levy, O., Schwartz, R., Bowman, S., & Smith, N. A. (2018). Annotation Artifacts in Natural Language Inference Data. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), 107–112. https://doi.org/10.18653/v1/N18-2017 [PDF]
- Goldberg, Y. (2019). Assessing BERT’s Syntactic Abilities. ArXiv:1901.05287 [Cs]. [PDF]
- Ettinger, A. (2019). What BERT Is Not: Lessons from a New Suite of Psycholinguistic Diagnostics for Language Models. ArXiv:1907.13528 [Cs]. [PDF]
- Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-Training of Deep Bidirectional Transformers for Language Understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), 4171–4186. [PDF]
- Baker, C. F., Fillmore, C. J., & Lowe, J. B. (1998). The Berkeley Framenet Project. Proceedings of the 17th International Conference on Computational Linguistics, 1, 86–90. Association for Computational Linguistics. [PDF]


Add new URL link
<- Back
Fill database record
URL type
External URL
Upload
Title
Valid first name is required.
Tag name
Valid last name is required.
URL
Please enter a valid email address for shipping updates.
URL location
Please enter your shipping address.
Would you like to store a pdf screenshot of that page
Trace url link status
Add
© 2017-2018 Company Name
Privacy
Terms
Support


{{ define "main" }}
{{ .Site.Title }} is an open source project that anyone in the community can use,
improve, and enjoy. We'd love you to join us! Here's a few ways to find out
what's happening and get involved.
Core Values:Join the {{ .Site.Title }} community
Good for Humans - Are we reasonable sure it will not make things worse.
Philosophy of Truth - The best predictor of tomorrow is truth today.
Expedition Behavior - We take calculated risks. Embrace the chaos.


HDD - Magnetic - Standard - Cheap, infrequently accessed storage.
You cannot mount 1 EBS Volume to multiple EC2 instances, instead use EFS.
Termination Protection is turned off by default, You must turn on termination protection if you would like that safety.
On an EBS backed storage, the default action on instance termination is deleting the EBS volume.
Root Volumes cannot be encrypted by default unless you use a thirdparty tool to encrypt the root volume. (eg: Bitlocker )
Additional Volumes can be encrypted.
Volumes VS Snapshots
Volumes exists on EBS
Virtual Harddisks
Snapshots exists on S3
You can take snapshots of a volume, this will store that volume on S3.
Snapshots are point in time copies of that volume.
Snapshots are incremental, this means that only the blocks that have changed since your last snapshots are moved to S3. ( first snapshots takes a while, but afterwards its fine )
Volumes VS Snapshots - Security
Snapshots of encrypted volumes are encrypted automatically.
Volumes that are restored from snapshots are encrypted automatically.
You can share snapshots with other AWS accounts, or publicly on the AWS market place, only if they are not encrypted.
Snapshots of Root Device Volumes.
To create a snapshot for Amazon EBS volume that serve as root device, you should stop the instance before taking the snapshot ( but can be done on a running instance ).
EBS vs Instance Store Volumes
Instance Store volumes are sometimes called Ephemeral Storage.
Instance Store volumes cannot be stopped, If the underlying host fails, you will loose your data.
EBS backed instances can be stopped, You will not loose the data on this instance if it is stopped.
You can reboot both, and you will not loose your data.
By default, both ROOT volumes will be deleted on termination, however with EBS volumes, you can tell AWS to keep the root device volume. ( set a FLAG )
How to take a snapshot from the RAID Array?
Problem - Take a snapshot, the snapshot excludes data held in the cache by applications and the OS. This tends not to matter on a single volume, however using multiple volumes in a RAID array, this can be a problem due to interdependencies of the array.
Solution - Take an application consistent snapshot.
Stop the application from writing to disk
Flush all caches to the disk.
Freeze the file system.
Unmount the RAID Array.
Shutdown the associated EC2 instance.
Amazon Machine Images
AMI’s are regional - You can only launch an AMI from the region in which it is stored. However you can copy AMI’s to other regions using the console, commandline or the Amazon EC2 API.
Cloudwatch Monitoring
Standard monitoring is enabled by default for EC2. ( Every 5 minutes )
You can enable Detailed Monitoring ( Every minute ).
CloudWatch is for performance monitoring.
CloudTrail is for Auditing
What can you create with CloudWatch ?
Dashboards - Create awesome dashboards to see what is happening with your aws environment.
Alarms - Allows you to set alarms that notify you when particular thresholds are hit.
Events - CloudWatch Events help you to respond to state changes in your aws resources.
Logs - CloudWatch logs help you to aggregate, monitor, and store logs.
Roles
Roles are more secure than storing your access key and secret access key on individual EC2 instances.
Roles are much easier to manage than having secret access keys around in terms of security.
If you loose your security key, you will have to delete the old ones and create a new one.
Roles can now be assigned to an EC2 instance after it has been provisioned using both the commandline and the AWS console.
Roles are global
Instance Metadata
Used to get information about an instance ( such as public IPV4 )
curl http://<IP_ADDRESS>/latest/meta-data/ will all the available information.
EFS
Support the Network File System Version 4 protocol (NFSv4)
You only pay for the storage you use ( no pre-provisioning required )
Can scale upto petabytes
Can support thousands of concurrent NFS connections
Data is stored across multiple AZ’s within a region.
Read After Write Consistency
Lambda
AWS lambda is a compute service where you can upload your code and create lambda function. AWS Lambda takes care of provisioning and managing the servers that you use to run the code. You dont have to worry about the operating systems, patching, scaling, etc. You can use Lambda in the following ways.
As an event driven compute service, AWS runs your code in response to events. These events could be changes to your data in an Amazon S3 bucket or an Amazon DynamoDB table.
As a compute service to run your code in response to HTTP requests using Amazon API gateway or API calls made using AWS SDK’s. This is what we use at A Cloud Guru.


"Let everything that has breath praise the Lord." (Psalm 150:6)
Singing Led by Alan Pate
52 RB - Firm Foundation
Shout Hallelujah
Welcome and Call to Worship
Prayer
116 - God Will Make A Way
Mighty To Save
Offering
153 - Come, Let us Worship and Bow Down
253 - Sweet Adoration
Communion
Scripture Reading (Psalm 119:9-16)
72 - Blessed Be the Lord God Almighty
76 - How Great Thou Art
Sermon
719 - Love One Another
Closing Remarks and Prayer
449 - Thy Word
Children and Parents
Ephesians 6:1-4


Kumawood actor fires Komfo Kolege for imitating Mmebusem ‘Ghana Jesus’
by Lizbeth BrownKumawood actor popularly known as Ogyam has descended heavily on Komfo Kolege (Guy Jesus) and Kobby 1 (Fair Jesus) for imitating Mmebusem ‘Ghana Jesus’.
In an exclusive interview with GhPage TV, Ogyam fired these Kumawood actors for copying Mmebusem and trying to bring him down.
Ogyam explained how Salinko decided to introduce Mmebusem to the ‘Ghana Jesus’ idea after he returned from the United States of America.
He revealed that after the video went viral, Mmebusem requested more money but Salinko refused to heed to his offer which infuriated him and later decided to start his own production.
Salinko who felt betrayed rained curses on Mmebusem for being ungrateful and ordered him to bring back his ‘Jesus’ attire.
However, recently two Kumawood actors have also decided to imitate Mmebusem and also act as the local Jesus.
Popular Kumawood actor Komfo Kolege known for his fetish priest roles has also rebranded himself as Guy Jesus.
Another Kumawood actor Kobby 1 was introduced by Salinko to replace Mmebusem as the New Jesus.
According to Ogyam, he cannot comprehend why these actors will imitate Mmebusem while they can also coin their own idea.
He rained insults on them labeling them as hypocrites adding that this is one of the main reasons why the movie industry is failing.
Watch the interview below;
Ogyam explained that there is so much hatred, backbiting, hypocrisy, greed, and selfishness in the Kumawood movie industry.
According to Ogyam, Mmebusem has already been accepted by Ghanaians as the ‘Ghana Jesus’ and no one can bring him down.


{% extends "template.html" %} {% block title %}
If you would like to highlight genes on the resulting volcano plot, add one gene per line. Gene name (bus-1) or WormBase ID are accepted (WBGene00018223) Partial matches will be highlighted , e.g. just bus highlight bus-1 and bus-18 genes.
Hold shift to select a range of cells


Preparation time
30 mins to 1 hour
Cooking time
10 to 30 mins
Serves
Serves 6
For the lavender flowers, heat the water and caster sugar together in a pan.
Stir until the sugar melts and then boil steadily, so that the liquid can reduce a little.
Take the pan off the heat and leave to cool.
When the sugar has cooled, add the lavender flowers to the pan.
For the panna cotta, line six ramekins with cling film and place on a tray. Warm three quarters of the cream with the vanilla sugar and orange zest in a pan, taking care not to boil the cream.
Strain the mixture through a sieve into a mixing bowl.
Sprinkle the gelatine over two tablespoons of water until it becomes spongy. Heat very gently in a clean pan over a low heat until it dissolves.
Add the cream mixture to the gelatine and take off the heat. Leave to cool.
Softly whip the remaining cream and add the cream to the mixture.
Pour the mixture into the lined ramekins and transfer to the fridge to chill.
Chill for at least two hours until set.
Turn the panna cotta out onto individual serving plates and drizzle the lavender syrup over them. Decorate with the sugary lavender flowers.


Depending on the room settings, users will first arrive in the waiting area before joining the room. The moderator can then allow some or all of those users to join in:


- getChoiceList() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the choice objects of the property.
- getChoices() - Method in class com.ecmdeveloper.eds.model.Choice
-
Returns a list of choice list items.
- getChoices() - Method in class com.ecmdeveloper.eds.model.ChoiceList
-
Returns a list of list of choice items for this choice list.
- getClientContext() - Method in interface com.ecmdeveloper.eds.model.ExternalDataRequest
-
An map that contains a series of key value pairs that specify contextual
information for a specific class or item type.
- getCustomInvalidItems() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns a collection containing the indices of the invalid items of a multi-value property.
- getCustomValidationError() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the description why a property value is invalid.
- getDisplayMode() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the display mode of the property.
- getDisplayName() - Method in class com.ecmdeveloper.eds.model.Choice
-
Returns the display name of the choice list item.
- getDisplayName() - Method in class com.ecmdeveloper.eds.model.ChoiceList
-
Returns the display name of the choice list.
- getExternalDataIdentifier() - Method in interface com.ecmdeveloper.eds.model.ExternalDataRequest
-
A string that indicates the state of the data that was returned by the
external data service.
- getExternalDataIdentifier() - Method in interface com.ecmdeveloper.eds.model.ExternalDataResponse
-
Returns a string that indicates the state of the data that was returned
by the external data service.
- getFormat() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns a regular expression describing the format of the property (Content Navigator only).
- getFormatDescription() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the description that is displayed in a tooltip if the user enters a format
that does not match the expression specified in the format parameter.
- getHasDependentProperties() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns a boolean value indicating if the value of this property controls
the value of other properties.
- getHidden() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns a boolean value indicating if the property is hidden.
- getLabel() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the label to put in front of the property editor (Content Navigator only).
- getMaxLength() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the maximum length of the property.
- getMaxValue() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the overridden maximum value of the property.
- getMinValue() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the overridden minimum value of the property.
- getObjectId() - Method in interface com.ecmdeveloper.eds.model.ExternalDataRequest
-
The globally unique identifier (GUID) or persistent identifier (PID) that
identifies the item that is being edited.
- getObjectType() - Method in interface com.ecmdeveloper.eds.model.ExternalDataRequest
-
The object type of the item that is being edited.
- getObjectTypeNames(String) - Method in class com.ecmdeveloper.eds.servlet.AbstractEDSServlet
-
Returns the names of the all the object types handled by this servlet.
- getProperty(String) - Method in interface com.ecmdeveloper.eds.model.ExternalDataRequest
-
Returns a specific property identified by it's symbolic name.
- getRepositoryId() - Method in interface com.ecmdeveloper.eds.model.ExternalDataRequest
-
The name of the target external data store that contains the property
data.
- getRequestMode() - Method in interface com.ecmdeveloper.eds.model.ExternalDataRequest
-
Returns the reason that the service is being called.
- getRequired() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns a boolean value indicating if the property is required.
- getSymbolicName() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the symbolic name of the property.
- getValue() - Method in class com.ecmdeveloper.eds.model.Choice
-
Returns the value of the choice list item.
- getValue() - Method in interface com.ecmdeveloper.eds.model.Property
-
Returns the value of this property.
- setChoiceList(ChoiceList) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets the choice objects of the property.
- setChoices(List<Choice>) - Method in class com.ecmdeveloper.eds.model.Choice
-
Sets the child choice items of this choice list items.
- setChoices(List<Choice>) - Method in class com.ecmdeveloper.eds.model.ChoiceList
-
Sets the choices of the choice list.
- setCustomInvalidItems(List<Integer>) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets a collection containing the indices of the invalid items of a multi-value property.
- setCustomValidationError(String) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets the description why a property value is invalid.
- setDisplayMode(DisplayMode) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets the display mode of the property
- setDisplayName(String) - Method in class com.ecmdeveloper.eds.model.Choice
-
Sets the display name of the choice list item.
- setDisplayName(String) - Method in class com.ecmdeveloper.eds.model.ChoiceList
-
Sets the display name of the choice list.
- setExternalDataIdentifier(String) - Method in interface com.ecmdeveloper.eds.model.ExternalDataResponse
-
Sets a string that indicates the state of the data that was returned by
the external data service.
- setFormat(String) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets a regular expression describing the format of the property (Content Navigator only)
- setFormatDescription(String) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets the description that is displayed in a tooltip if the user enters a format
that does not match the expression specified in the format parameter
(Content Navigator only).
- setHasDependentProperties(Boolean) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets a boolean value indicating if the value of this property controls
the value of other properties.
- setHidden(Boolean) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets a boolean value indicating if the property is hidden.
- setLabel(String) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets the label to put in front of the property editor (Content Navigator only)
- setMaxLength(Integer) - Method in interface com.ecmdeveloper.eds.model.Property
-
Set the maximum lenght of the property.
- setMaxValue(Object) - Method in interface com.ecmdeveloper.eds.model.Property
-
Set the overridden maximum value of the property.
- setMinValue(Object) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets the overridden minimum value of the property.
- setRequired(Boolean) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets a boolean value indicating if the property is required.
- setValue(String) - Method in class com.ecmdeveloper.eds.model.Choice
-
Sets the string value of the choice list item.
- setValue(Object) - Method in interface com.ecmdeveloper.eds.model.Property
-
Sets the value of this property.
- symbolicName - Variable in class com.ecmdeveloper.eds.model.ObjectType
-


Session Name: ' '
Room Code: ' '
Find your position, then fill out the information:
Presenter
- Write code for others to view
Please enter the following:
Start
Participant
- View code written live by your presenter.
Please enter the code given to you by the presenter:
Join