This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Animated, { | |
useSharedValue, | |
withTiming, | |
useAnimatedStyle, | |
useDerivedValue, | |
Easing, | |
withSpring, | |
} from 'react-native-reanimated'; | |
import {View, Button, Dimensions, Text, TouchableOpacity} from 'react-native'; | |
import MaskedView from '@react-native-community/masked-view'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable react-native/no-inline-styles */ | |
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
* @flow | |
*/ | |
import React from 'react'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def optimize(nn_last_layer, correct_label, learning_rate, num_classes): | |
# Reshape 4D tensors to 2D, each row represents a pixel, each column a class | |
logits = tf.reshape(nn_last_layer, (-1, num_classes), name="fcn_logits") | |
correct_label_reshaped = tf.reshape(correct_label, (-1, num_classes)) | |
# Calculate distance from actual labels using cross entropy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { | |
View, | |
SafeAreaView, | |
Text, | |
Dimensions, | |
StyleSheet, | |
TouchableWithoutFeedback | |
} from "react-native"; | |
import Svg, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { FlatList, PanResponder, View, Image } from "react-native"; | |
class Paginator extends React.Component { | |
// can ignore the color getAccentColor and this.props.onPaginatorScroll stuff. | |
getAccentColor(index) { | |
if (index % 4 == 0) return "#FF9F5D"; | |
if (index % 3 == 0) return "#FF8EAC"; |